采购合同接口对接

This commit is contained in:
zzyuan 2025-07-02 10:48:56 +08:00
parent dd1ac44876
commit e2b2adf004
1 changed files with 29 additions and 24 deletions

View File

@ -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