md
This commit is contained in:
parent
c4de100f95
commit
4fc51f69ac
@ -22,11 +22,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('目的国家')" prop="destCountry">
|
||||
<CountryPicker :placeholder="$t('选择国家')" v-model="coData.destCountry" ></CountryPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('起始网点')" prop="startSiteCode">
|
||||
<EmisSiteSimplePicker :placeholder="$t('请选择')" @change="onSiteSelect" v-model="coData.startSiteCode" :disabled="$store.getters.ownerSiteCode != '88888'" ></EmisSiteSimplePicker>
|
||||
@ -61,7 +57,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="coData.transType == 2">
|
||||
|
||||
<!-- <el-col :span="8" v-if="coData.transType == 2">
|
||||
<el-form-item :label="$t('航空单号')" prop="airBilllNo">
|
||||
<el-input v-model="coData.airBilllNo" />
|
||||
</el-form-item>
|
||||
@ -90,22 +87,34 @@
|
||||
placeholder="请选择开船时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="['1','3','5'].indexOf(coData.transType) > -1">
|
||||
<el-form-item :label="$t('车牌号')" prop="carNo">
|
||||
</el-col> -->
|
||||
|
||||
<!-- v-if="['1','3','5'].indexOf(coData.transType) > -1" -->
|
||||
<!-- v-if="['1','3','5'].indexOf(coData.transType) > -1" -->
|
||||
|
||||
<el-col :span="8" >
|
||||
<el-form-item :label="$t('运输号')" prop="carNo">
|
||||
<el-input v-model="coData.carNo" clearable="" placeholder=""></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="['1','3','5'].indexOf(coData.transType) > -1">
|
||||
<el-form-item label="发车时间" prop="carTime">
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="发出时间" prop="carTime">
|
||||
<el-date-picker clearable
|
||||
v-model="coData.carTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择发车时间">
|
||||
placeholder="请选择发出时间"
|
||||
style="width:100%"
|
||||
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('目的国')" prop="destCountry">
|
||||
<CountryPicker :placeholder="$t('选择国')" v-model="coData.destCountry" ></CountryPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
@ -553,9 +562,9 @@ export default {
|
||||
batchName: [
|
||||
{ required: true, message: "批次名称不能为空", trigger: ["blur","change"] },
|
||||
],
|
||||
destCountry: [
|
||||
{ required: true, message: "目的国不能为空", trigger: ["blur","change"] },
|
||||
],
|
||||
// destCountry: [
|
||||
// { required: true, message: "目的国不能为空", trigger: ["blur","change"] },
|
||||
// ],
|
||||
startSiteCode: [
|
||||
{ required: true, message: "起始网点不能为空", trigger: ["blur","change"] },
|
||||
],
|
||||
@ -1010,14 +1019,14 @@ export default {
|
||||
this.wayBillData.dateTimeRange=value;
|
||||
},
|
||||
async handleAddCoPack(){
|
||||
if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType
|
||||
|| (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime))
|
||||
|| (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime))
|
||||
|| ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime))
|
||||
){
|
||||
this.$modal.msgError("请先选择必填项")
|
||||
return;
|
||||
}
|
||||
// if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType
|
||||
// || (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime))
|
||||
// || (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime))
|
||||
// || ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime))
|
||||
// ){
|
||||
// this.$modal.msgError("请先选择必填项")
|
||||
// return;
|
||||
// }
|
||||
if(this.emisCoPackDetail.length == 0){
|
||||
this.$modal.msgError("请先选择至少一条运单信息")
|
||||
return;
|
||||
@ -1055,16 +1064,18 @@ export default {
|
||||
totalVolume: this.coData.totalVolume || null,
|
||||
totalWeight: this.coData.totalWeight || null,
|
||||
}
|
||||
if(this.coData.transType == 2){
|
||||
coPackItem.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
this.coData.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
}else if(this.coData.transType == 4){
|
||||
coPackItem.etd = parseTime(this.coData.shipTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
this.coData.etd = parseTime(this.coData.shipTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
}else{
|
||||
coPackItem.etd = parseTime(this.coData.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
this.coData.etd = parseTime(this.coData.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
}
|
||||
// if(this.coData.transType == 2){
|
||||
// coPackItem.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
// this.coData.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
// }else if(this.coData.transType == 4){
|
||||
// coPackItem.etd = parseTime(this.coData.shipTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
// this.coData.etd = parseTime(this.coData.shipTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
// }else{
|
||||
// }
|
||||
|
||||
coPackItem.etd = parseTime(this.coData.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
this.coData.etd = parseTime(this.coData.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
|
||||
if(this.coPackType == "add"){// 新增
|
||||
let resPack = await getTmsGroupBatchNo();
|
||||
if(!resPack || resPack.code != 200){
|
||||
@ -1421,14 +1432,14 @@ export default {
|
||||
this.wayBillotal=0;
|
||||
},
|
||||
handleCoPackListDelete(){
|
||||
if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType
|
||||
|| (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime))
|
||||
|| (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime))
|
||||
|| ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime))
|
||||
){
|
||||
this.$modal.msgError("请先选择必填项")
|
||||
return;
|
||||
}
|
||||
// if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType
|
||||
// || (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime))
|
||||
// || (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime))
|
||||
// || ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime))
|
||||
// ){
|
||||
// this.$modal.msgError("请先选择必填项")
|
||||
// return;
|
||||
// }
|
||||
|
||||
if(this.coPackType == "edit"){
|
||||
this.$confirm('确认删除该条数据吗?', '确认信息')
|
||||
@ -1555,80 +1566,17 @@ export default {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
|
||||
|
||||
},
|
||||
async handleAdd_old() {
|
||||
this.coPackType="add";
|
||||
this.coData = {};
|
||||
if(this.activeName=="first"){
|
||||
let firstItemCountry = this.waitPackList.length > 0 ? this.waitPackList[0].receiveCountry : '';
|
||||
// 将选中的“待组批次”的运单 置为 追加的运单号
|
||||
for(let p = 0; p < this.waitPackList.length;p++){
|
||||
if(this.waitPackList[p].receiveCountry != firstItemCountry){
|
||||
this.$modal.msgError("存在了不同的目的国家!");
|
||||
this.emisCoPackDetail=[];
|
||||
return ;
|
||||
}
|
||||
this.emisCoPackDetail.push(this.waitPackList[p]);
|
||||
}
|
||||
}else if(this.activeName=="fourth"){
|
||||
// let firstItemCountry = this.waitPackList.length > 0 ? this.waitPackList[0].receiveCountry : '';
|
||||
// // 将选中的“待组批次”的运单 置为 追加的运单号
|
||||
// for(let p = 0; p < this.waitPackList.length;p++){
|
||||
// if(this.waitPackList[p].receiveCountry != firstItemCountry){
|
||||
// this.$modal.msgError("存在了不同的目的国家!");
|
||||
// this.emisCoPackDetail=[];
|
||||
// return ;
|
||||
// }
|
||||
// this.emisCoPackDetail.push(this.waitPackList[p]);
|
||||
// }
|
||||
let res = await this.$refs.packListView.getPackBillList();
|
||||
if(res.code == -1){
|
||||
this.$modal.msgError(res.message);
|
||||
return;
|
||||
}
|
||||
this.emisCoPackDetail = [...res.list];
|
||||
}
|
||||
this.tempExistCoPackWayBillList = [];// 清空临时保存的已有运单号
|
||||
this.tempCoPackInfo={};
|
||||
this.coData.createTime = parseTime(new Date());
|
||||
this.coData.destCountry = null;
|
||||
this.coData.destCountryName = null;
|
||||
// this.coData.sendSiteCode = null;
|
||||
this.coData.nextSiteCode = null;
|
||||
this.coData.nextSiteName = null;
|
||||
this.coData.nextStation = null;
|
||||
// this.blUnpack = "1";
|
||||
|
||||
this.tableData = [
|
||||
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
||||
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
||||
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
|
||||
];
|
||||
this.tableDataId=[
|
||||
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
||||
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
||||
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
|
||||
];
|
||||
|
||||
this.coData.startSiteCode = this.$store.getters.ownerSiteCode;
|
||||
this.coData.startSiteName=this.$store.getters.ownerSiteName;
|
||||
|
||||
this.computeTotal();
|
||||
|
||||
this.currentId=null;
|
||||
this.openForm= true;
|
||||
this.titleForm = "新增组批次";
|
||||
},
|
||||
handleAddWayBill(){
|
||||
if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType
|
||||
|| (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime))
|
||||
|| (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime))
|
||||
|| ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime))
|
||||
){
|
||||
this.$modal.msgError("请先选择必填项")
|
||||
return;
|
||||
}
|
||||
// if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType
|
||||
// || (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime))
|
||||
// || (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime))
|
||||
// || ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime))
|
||||
// ){
|
||||
// this.$modal.msgError("请先选择必填项")
|
||||
// return;
|
||||
// }
|
||||
// this.openWayBillForm= true;
|
||||
// this.titleWayBill = "运单列表";
|
||||
this.openBatch = true;
|
||||
@ -1654,13 +1602,15 @@ export default {
|
||||
}
|
||||
let resData = response.data;
|
||||
let time = {};
|
||||
if(resData.transType == 2){
|
||||
time.airTime = resData.etd;
|
||||
}else if(resData.transType == 4){
|
||||
time.shipTime = resData.etd;
|
||||
}else{
|
||||
time.carTime = resData.etd;
|
||||
}
|
||||
// if(resData.transType == 2){
|
||||
// time.airTime = resData.etd;
|
||||
// }else if(resData.transType == 4){
|
||||
// time.shipTime = resData.etd;
|
||||
// }else{
|
||||
// time.carTime = resData.etd;
|
||||
// }
|
||||
|
||||
time.carTime = resData.etd;
|
||||
this.coData = {...resData, ...{batchDate:resData.createTime}, ...time};
|
||||
// this.coData.batchNo = resData.batchNo;
|
||||
// this.coData.destCountry = resData.destCountry;
|
||||
|
||||
@ -361,6 +361,7 @@
|
||||
<el-input v-model="form.billWeight" @blur="handleCalcSettlementWeight" @keyup.enter.native="handleCalcSettlementWeight" style="text-align: right;min-width: 80px" placeholder="" >
|
||||
<span slot="suffix">(kg)</span>
|
||||
</el-input>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user