This commit is contained in:
linfso 2025-06-25 14:05:44 +08:00
parent 1125322ba2
commit 167eef0937
2 changed files with 13 additions and 26 deletions

View File

@ -98,7 +98,7 @@
</template>
<script>
import { listEmisTmsSiteBatch, getTmsGroupBatchNo, getEmisTmsSiteBatch, delEmisTmsSiteBatch, addEmisTmsSiteBatch, updateEmisTmsSiteBatch } from "@/api/emis/emisTmsSiteBatch";
import { listEmisTmsSiteBatch, getTmsGroupBatchNo, getEmisTmsSiteBatch, delEmisTmsSiteBatch, addEmisTmsSiteBatch, updateEmisTmsSiteBatch,addAllEmisTmsSiteBatch } from "@/api/emis/emisTmsSiteBatch";
import { listSimpleEmisSite } from "@/api/emis/emisSite";
import { listSimpleEmisSupplier } from "@/api/emis/emisSupplier";
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
@ -594,7 +594,7 @@ export default {
postForm.totalVolume=totalVolume.toFixed(4);
// 插入数据
let response = await addEmisTmsSiteBatch(postForm);
let response = await addAllEmisTmsSiteBatch(postForm);
if(!response || response.code != 200){
let rst = {
code:500,

View File

@ -333,7 +333,7 @@
</XdTable>
<div style="text-align: center;margin-bottom: 10px;" v-if="!disabled">
<el-button type="primary" :loading="isDoing" @click="submitAddCoPackForm">保存批次</el-button>
<el-button type="primary" :loading="isDoing" @click="submitSaveBatchForm">保存批次</el-button>
<el-button @click="handleCancelCo">取 消</el-button>
</div>
@ -349,8 +349,8 @@
</el-form>
<!-- :loading="isDoing" -->
<div slot="footer" class="dialog-footer" style="text-align:center">
<el-button type="primary" @click="submitFormBatch">确定</el-button>
<el-button @click="cancelBatch">取 消</el-button>
<el-button type="primary" @click="addBillToBatch">确定</el-button>
<el-button @click="cancelAddBillToBatch">取 消</el-button>
</div>
</el-dialog>
</div>
@ -679,9 +679,6 @@ export default {
if(this.batchId !=null) {
this.showBatchInfo(this.batchId);
this.coPackType = "edit";
}else{
this.reset();
@ -1028,7 +1025,7 @@ export default {
this.wayBillData.dateTimeRange=value;
},
submitAddCoPackForm() {
submitSaveBatchForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.handleAddCoPack();
@ -1166,15 +1163,15 @@ export default {
this.tempCoPackList = selection;
this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true;
},
async submitFormBatch(){
async addBillToBatch(){
if(this.formBatchBillList==null || this.formBatchBillList==''){
this.$modal.msgError("请输入单号");
return;
}
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
let billCodeList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
for(let i = 0; i < bcList.length; i++){
let billcode = bcList[i].trim();
for(let i = 0; i < billCodeList.length; i++){
let billcode = billCodeList[i].trim();
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
let billRes = await listEmisWaybill(
@ -1209,15 +1206,12 @@ export default {
};
try{
let response = await addEmisTmsSiteBatchDtl(packDetail);
this.emisCoPackDetail.push(item);
}catch(e){
console.log('e',e)
return;
}
this.emisCoPackDetail.push(item);
// if(!response || response.code != 200){
// this.$modal.msgError(response && response.msg || '组批次明细新增失败')
// return;
// }
}else{
this.emisCoPackDetail.push(item);
}
@ -1275,8 +1269,6 @@ export default {
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
return;
}
}
}
})
@ -1456,16 +1448,11 @@ export default {
this.queryParams.isAsc = column.order;
this.getList();
},
/** 新增按钮操作 */
handleAdd() {
},
handleAddWayBill(){
this.openBatch = true;
this.titleBatch = "批量输入运单号";
},
cancelBatch(){
cancelAddBillToBatch(){
this.openBatch=false;
this.titleBatch = "";
this.formBatchBillList = "";