采购合同接口对接

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>
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<el-button type="primary" plain @click="addMaterial">添加货品</el-button> <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> </div>
<div style="width: 100%;height: 400px;overflow-y: auto;"> <div style="width: 100%;height: 400px;overflow-y: auto;">
@ -141,8 +141,9 @@
</div> </div>
</div> </div>
<div style="width: 100%;height: 80px;padding: 10px;background: #FFF;border-radius: 10px;display: flex;align-items: center;justify-content: center;"> <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 type="primary" plain @click="confirmSave" :loading="loadingBtn">保存草稿</el-button>
<el-button @click="confirmSubmit">提交</el-button> <el-button type="success" plain @click="confirmSubmit" :loading="loadingBtn">提交</el-button>
<el-button @click="jumpList">返回</el-button>
</div> </div>
<!-- 选择菜品 --> <!-- 选择菜品 -->
@ -255,25 +256,22 @@ export default {
canteenOptions:[], canteenOptions:[],
supplierOptions:[], supplierOptions:[],
stallOptions:[], stallOptions:[],
pickerOptions: { pickerOptions: {
disabledDate(v) { disabledDate(v) {
return v.getTime() < (new Date().getTime() - 86400000);// - 86400000 return v.getTime() < (new Date().getTime() - 86400000);// - 86400000
} }
}, },
contractMaterialList:[], contractMaterialList:[],//-
batchIds:[],//--
openDialog:false, openDialog:false,
materialTreeOptions:[], materialTreeOptions:[],
// queryParams: { // --
queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
// total: 0, //
total: 0, tableListData: [],//-
// batchChosenMaterial:[],//--
tableListData: [],
batchChosenMaterial:[],
noMaterial:false, noMaterial:false,
}; };
}, },
@ -365,6 +363,20 @@ export default {
changeDateRange(e){ changeDateRange(e){
//this.formatDate(e[0]) //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(){ addMaterial(){
if(this.baseInfo.areaId!=undefined){ if(this.baseInfo.areaId!=undefined){
this.openDialog=true this.openDialog=true
@ -539,13 +551,6 @@ export default {
} }
}); });
}, },
//
handleSelectionChange(selection) {
// this.batchIds1 = selection.map(item => item.tradeId)
// this.single = selection.length !== 1
// this.multiple = !selection.length
},
// //
formatDate(date) { formatDate(date) {
// YYYY-MM-DD // YYYY-MM-DD