md
This commit is contained in:
parent
1125322ba2
commit
167eef0937
@ -98,7 +98,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { listSimpleEmisSite } from "@/api/emis/emisSite";
|
||||||
import { listSimpleEmisSupplier } from "@/api/emis/emisSupplier";
|
import { listSimpleEmisSupplier } from "@/api/emis/emisSupplier";
|
||||||
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
|
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
|
||||||
@ -594,7 +594,7 @@ export default {
|
|||||||
postForm.totalVolume=totalVolume.toFixed(4);
|
postForm.totalVolume=totalVolume.toFixed(4);
|
||||||
|
|
||||||
// 插入数据
|
// 插入数据
|
||||||
let response = await addEmisTmsSiteBatch(postForm);
|
let response = await addAllEmisTmsSiteBatch(postForm);
|
||||||
if(!response || response.code != 200){
|
if(!response || response.code != 200){
|
||||||
let rst = {
|
let rst = {
|
||||||
code:500,
|
code:500,
|
||||||
|
|||||||
@ -333,7 +333,7 @@
|
|||||||
</XdTable>
|
</XdTable>
|
||||||
|
|
||||||
<div style="text-align: center;margin-bottom: 10px;" v-if="!disabled">
|
<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>
|
<el-button @click="handleCancelCo">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -349,8 +349,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<!-- :loading="isDoing" -->
|
<!-- :loading="isDoing" -->
|
||||||
<div slot="footer" class="dialog-footer" style="text-align:center">
|
<div slot="footer" class="dialog-footer" style="text-align:center">
|
||||||
<el-button type="primary" @click="submitFormBatch">确定</el-button>
|
<el-button type="primary" @click="addBillToBatch">确定</el-button>
|
||||||
<el-button @click="cancelBatch">取 消</el-button>
|
<el-button @click="cancelAddBillToBatch">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -679,9 +679,6 @@ export default {
|
|||||||
if(this.batchId !=null) {
|
if(this.batchId !=null) {
|
||||||
this.showBatchInfo(this.batchId);
|
this.showBatchInfo(this.batchId);
|
||||||
this.coPackType = "edit";
|
this.coPackType = "edit";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|
||||||
@ -1028,7 +1025,7 @@ export default {
|
|||||||
this.wayBillData.dateTimeRange=value;
|
this.wayBillData.dateTimeRange=value;
|
||||||
},
|
},
|
||||||
|
|
||||||
submitAddCoPackForm() {
|
submitSaveBatchForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.handleAddCoPack();
|
this.handleAddCoPack();
|
||||||
@ -1166,15 +1163,15 @@ export default {
|
|||||||
this.tempCoPackList = selection;
|
this.tempCoPackList = selection;
|
||||||
this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true;
|
this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true;
|
||||||
},
|
},
|
||||||
async submitFormBatch(){
|
async addBillToBatch(){
|
||||||
if(this.formBatchBillList==null || this.formBatchBillList==''){
|
if(this.formBatchBillList==null || this.formBatchBillList==''){
|
||||||
this.$modal.msgError("请输入单号");
|
this.$modal.msgError("请输入单号");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
let billCodeList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
||||||
|
|
||||||
for(let i = 0; i < bcList.length; i++){
|
for(let i = 0; i < billCodeList.length; i++){
|
||||||
let billcode = bcList[i].trim();
|
let billcode = billCodeList[i].trim();
|
||||||
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
|
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
|
||||||
|
|
||||||
let billRes = await listEmisWaybill(
|
let billRes = await listEmisWaybill(
|
||||||
@ -1209,15 +1206,12 @@ export default {
|
|||||||
};
|
};
|
||||||
try{
|
try{
|
||||||
let response = await addEmisTmsSiteBatchDtl(packDetail);
|
let response = await addEmisTmsSiteBatchDtl(packDetail);
|
||||||
|
this.emisCoPackDetail.push(item);
|
||||||
}catch(e){
|
}catch(e){
|
||||||
console.log('e',e)
|
console.log('e',e)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.emisCoPackDetail.push(item);
|
|
||||||
// if(!response || response.code != 200){
|
|
||||||
// this.$modal.msgError(response && response.msg || '组批次明细新增失败')
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
}else{
|
}else{
|
||||||
this.emisCoPackDetail.push(item);
|
this.emisCoPackDetail.push(item);
|
||||||
}
|
}
|
||||||
@ -1275,8 +1269,6 @@ export default {
|
|||||||
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
|
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1456,16 +1448,11 @@ export default {
|
|||||||
this.queryParams.isAsc = column.order;
|
this.queryParams.isAsc = column.order;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
handleAddWayBill(){
|
handleAddWayBill(){
|
||||||
this.openBatch = true;
|
this.openBatch = true;
|
||||||
this.titleBatch = "批量输入运单号";
|
this.titleBatch = "批量输入运单号";
|
||||||
},
|
},
|
||||||
cancelBatch(){
|
cancelAddBillToBatch(){
|
||||||
this.openBatch=false;
|
this.openBatch=false;
|
||||||
this.titleBatch = "";
|
this.titleBatch = "";
|
||||||
this.formBatchBillList = "";
|
this.formBatchBillList = "";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user