采购合同接口对接
This commit is contained in:
parent
dd1ac44876
commit
e2b2adf004
|
|
@ -99,7 +99,7 @@
|
|||
</div>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<el-button type="primary" plain @click="addMaterial">添加货品</el-button>
|
||||
<el-button type="danger" plain @click="">删除</el-button>
|
||||
<el-button type="danger" plain @click="delMaterial">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%;height: 400px;overflow-y: auto;">
|
||||
|
|
@ -141,8 +141,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div style="width: 100%;height: 80px;padding: 10px;background: #FFF;border-radius: 10px;display: flex;align-items: center;justify-content: center;">
|
||||
<el-button type="primary" @click="confirmSave" :loading="loadingBtn">保存草稿</el-button>
|
||||
<el-button @click="confirmSubmit">提交</el-button>
|
||||
<el-button type="primary" plain @click="confirmSave" :loading="loadingBtn">保存草稿</el-button>
|
||||
<el-button type="success" plain @click="confirmSubmit" :loading="loadingBtn">提交</el-button>
|
||||
<el-button @click="jumpList">返回</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 选择菜品 -->
|
||||
|
|
@ -255,26 +256,23 @@ export default {
|
|||
canteenOptions:[],
|
||||
supplierOptions:[],
|
||||
stallOptions:[],
|
||||
|
||||
pickerOptions: {
|
||||
disabledDate(v) {
|
||||
return v.getTime() < (new Date().getTime() - 86400000);// - 86400000是否包括当天
|
||||
}
|
||||
},
|
||||
contractMaterialList:[],
|
||||
contractMaterialList:[],//货品信息-表格数据
|
||||
batchIds:[],//货品信息-表格数据-多选
|
||||
openDialog:false,
|
||||
materialTreeOptions:[],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
materialTreeOptions:[],
|
||||
queryParams: { // 货品弹窗-货品表格-查询参数
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
batchChosenMaterial:[],
|
||||
noMaterial:false,
|
||||
},
|
||||
total: 0, // 总条数
|
||||
tableListData: [],//货品弹窗-货品表格数据
|
||||
batchChosenMaterial:[],//货品弹窗-货品表格-选中的货品数组
|
||||
noMaterial:false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -365,6 +363,20 @@ export default {
|
|||
changeDateRange(e){
|
||||
//this.formatDate(e[0])
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.batchIds = selection.map(item => item.materialId)
|
||||
},
|
||||
//删除货品
|
||||
delMaterial(){
|
||||
this.batchIds.forEach(ID=>{
|
||||
let index = this.contractMaterialList.findIndex(v=>v.materialId==ID)
|
||||
if(index>-1){
|
||||
this.contractMaterialList.splice(index,1)
|
||||
}
|
||||
})
|
||||
},
|
||||
//添加货品
|
||||
addMaterial(){
|
||||
if(this.baseInfo.areaId!=undefined){
|
||||
this.openDialog=true
|
||||
|
|
@ -376,7 +388,7 @@ export default {
|
|||
this.$modal.msgError("请先选择区域");
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
@ -538,14 +550,7 @@ export default {
|
|||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
// this.batchIds1 = selection.map(item => item.tradeId)
|
||||
// this.single = selection.length !== 1
|
||||
// this.multiple = !selection.length
|
||||
},
|
||||
|
||||
},
|
||||
//日期
|
||||
formatDate(date) {
|
||||
// 格式化为 YYYY-MM-DD
|
||||
|
|
|
|||
Loading…
Reference in New Issue