Commit 058b8d1c by 潘际乾
parents f692af8f 8f13d4ed
...@@ -387,7 +387,7 @@ export default { ...@@ -387,7 +387,7 @@ export default {
this.title = row.pandsc this.title = row.pandsc
this.centerDialogVisible = true, this.centerDialogVisible = true,
this.dialog = rtnmsg.data.trnmod_trndoc_doceot[index] this.dialog = rtnmsg.data.trnmod_trndoc_doceot[index]
console.log(this.dialog.rcv.namelc); this.index = index
} }
}, },
async BlurBennam(e){ async BlurBennam(e){
......
...@@ -176,6 +176,8 @@ export default { ...@@ -176,6 +176,8 @@ export default {
"didgrp.beb.pts.bankno": [ "didgrp.beb.pts.bankno": [
{ type: "string", required: false, message: "必输项" }, { type: "string", required: false, message: "必输项" },
//TODO 三位汉字的判断没加
{ pattern: /^[0-9A-Za-z]{6,}$/, message: "至少输入3个字或6位行号" },
{ max: 20, message: "长度不能超过20" } { max: 20, message: "长度不能超过20" }
], ],
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</c-select> </c-select>
</el-form-item> </el-form-item>
<el-form-item label="付款期限" prop="didgrp.rec.tenmaxday"> <el-form-item label="付款期限" prop="didgrp.rec.tenmaxday" @keyup.enter.native="recTenmaxdayEvent">
<c-input :disabled="model.didgrp.rec.avbby == 'P'" v-model="model.didgrp.rec.tenmaxday" placeholder="请输入"></c-input> <c-input :disabled="model.didgrp.rec.avbby == 'P'" v-model="model.didgrp.rec.tenmaxday" placeholder="请输入"></c-input>
</el-form-item> </el-form-item>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</el-form-item> </el-form-item>
<el-form-item label="货物运输或交货方式/服务方式" prop="didgrp.rec.tratyp"> <el-form-item label="货物运输或交货方式/服务方式" prop="didgrp.rec.tratyp">
<c-select v-model="model.didgrp.rec.tratyp" style="width:100%" placeholder="请选择"> <c-select v-model="model.didgrp.rec.tratyp" style="width:100%" placeholder="请选择" @change="recTratypChange" :disabled="model.didgrp.rec.mytype == 'F'">
<el-option v-for="item in codes.tratyp" :key="item.value" :label="item.label" <el-option v-for="item in codes.tratyp" :key="item.value" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
</el-form-item> </el-form-item>
<el-form-item v-if="model.didgrp.rec.mytype == 'H'" label="手输运输方式" prop="didgrp.rec.sdsrfs"> <el-form-item v-if="model.didgrp.rec.mytype == 'H'" label="手输运输方式" prop="didgrp.rec.sdsrfs">
<c-input type="textarea" v-model="model.didgrp.rec.sdsrfs" :disabled="model.didgrp.rec.mytype == 'H'" maxlength="140" show-word-limit placeholder="请输入"></c-input> <c-input type="textarea" v-model="model.didgrp.rec.sdsrfs" :disabled="this.mytypeFlag" maxlength="140" show-word-limit placeholder="请输入"></c-input>
</el-form-item> </el-form-item>
<el-form-item v-if="model.didgrp.rec.mytype == 'F'" label="服务提供方式" prop="didgrp.rec.sdsrfs"> <el-form-item v-if="model.didgrp.rec.mytype == 'F'" label="服务提供方式" prop="didgrp.rec.sdsrfs">
<c-input type="textarea" v-model="model.didgrp.rec.sdsrfs" maxlength="140" show-word-limit placeholder="请输入"></c-input> <c-input type="textarea" v-model="model.didgrp.rec.sdsrfs" maxlength="140" show-word-limit placeholder="请输入"></c-input>
</el-form-item> </el-form-item>
<el-form-item v-if="model.didgrp.rec.mytype == '3'" label="手输运输方式/服务提供方式" prop="didgrp.rec.sdsrfs"> <el-form-item v-if="model.didgrp.rec.mytype == '3'" label="手输运输方式/服务提供方式" prop="didgrp.rec.sdsrfs">
<c-input type="textarea" v-model="model.didgrp.rec.sdsrfs" :disabled="true" maxlength="140" show-word-limit placeholder="请输入"></c-input> <c-input type="textarea" v-model="model.didgrp.rec.sdsrfs" :disabled="this.mytypeFlag" maxlength="140" show-word-limit placeholder="请输入"></c-input>
</el-form-item> </el-form-item>
...@@ -85,9 +85,9 @@ ...@@ -85,9 +85,9 @@
</el-form-item> </el-form-item>
<el-form-item label="转运" prop="didgrp.rec.shptrs"> <el-form-item label="转运" prop="didgrp.rec.shptrs">
<c-select v-model="model.didgrp.rec.shptrs" style="width:100%" placeholder="请选择"> <c-select v-model="model.didgrp.rec.shptrs" style="width:100%" placeholder="请选择" :disabled="model.didgrp.rec.mytype == 'F'">
<el-option label="NOT ALLOWED" value="1"></el-option> <el-option label="不允许" value="1"></el-option>
<el-option label="ALL OWED" value="2"></el-option> <el-option label="允许" value="2"></el-option>
</c-select> </c-select>
</el-form-item> </el-form-item>
...@@ -126,33 +126,57 @@ ...@@ -126,33 +126,57 @@
import Api from "~/service/Api" import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable" import CodeTable from "~/config/CodeTable"
import Event from "~/model/Ditopn/Event" import Event from "~/model/Ditopn/Event"
import Utils from "~/utils";
export default { export default {
props:["model","codes"], props:["model","codes"],
data(){ data(){
return { return {
flag:false, flag:false,
mytypeFlag:true,
} }
}, },
methods:{...Event, methods:{...Event,
preperflgExtkeyEvent(){ preperflgExtkeyEvent(){
this.flag = !this.model.didgrp.blk.preperflg this.flag = !this.model.didgrp.blk.preperflg
if (this.flag === true){
this.model.didgrp.blk.preper = "货物装运日后15天";
}
}, },
avbbykeyEvent(){ avbbykeyEvent(){
if(this.model.didgrp.rec.avbby == 'P'){ if(this.model.didgrp.rec.avbby == 'P'){
this.model.didgrp.rec.tenmaxday = 0; this.model.didgrp.rec.tenmaxday = 0;
this.model.didgrp.blk.defdet = ""; this.model.didgrp.blk.defdet = "";
} }
Api.post("ditopn/default/didgrp.rec.tenmaxday", this.model).then( const arg = Utils.flatObject(this.model);
Api.post("ditopn/default/didgrp.rec.avbby", arg).then(
(res) => { (res) => {
if (res.respCode = "AAAAAA"){ if (res.respCode = "AAAAAA"){
const data = res.data; const data = res.data;
this.model.didgrp.blk.defdet = data.didgrp_blk_defdet; this.model.didgrp.blk.defdet = data.didgrp_blk_defdet;
} }
} }
); );
},
recTenmaxdayEvent(){
const arg = Utils.flatObject(this.model);
Api.post("ditopn/default/didgrp.rec.tenmaxday", arg).then(
(res) => {
if (res.respCode = "AAAAAA"){
const data = res.data;
this.model.didgrp.blk.defdet = data.didgrp_blk_defdet;
}
}
);
},
recTratypChange(){
if (this.model.didgrp.rec.tratyp == "08"){
this.model.didgrp.rec.sdsrfs = "";
this.mytypeFlag = false;
}else{
this.model.didgrp.rec.sdsrfs = "";
this.mytypeFlag = true;
}
} }
}, },
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
:disabled=" :disabled="
model.trnmod.trndoc.doceot[scope.row.index] model.trnmod.trndoc.doceot[scope.row.index]
.pandsc == 'MT799' && .pandsc == 'MT799' &&
model.didgrp.rec.elcflg=='Y' model.didgrp.rec.elcflg == 'Y'
" "
@click="handleDisplay(scope.row.index, scope.row)" @click="handleDisplay(scope.row.index, scope.row)"
>显示</el-button >显示</el-button
...@@ -336,18 +336,26 @@ ...@@ -336,18 +336,26 @@
v-if="title == 'elcs.101.001.01'" v-if="title == 'elcs.101.001.01'"
label="行联行号" label="行联行号"
> >
<el-input v-model="dialog.rcv.pts.bankno"/> <el-input v-model="dialog.rcv.pts.bankno" />
</el-form-item> </el-form-item>
<el-form-item label-width="30px"> <el-form-item label-width="30px">
<el-input <el-input
:value="title != 'elcs.101.001.01'?dialog.rcv.namelc:dialog.rcv.pts.jigomc" :value="
title != 'elcs.101.001.01'
? dialog.rcv.namelc
: dialog.rcv.pts.jigomc
"
:disabled="title != 'elcs.101.001.01'" :disabled="title != 'elcs.101.001.01'"
type="textarea" type="textarea"
:rows="2" :rows="2"
/> />
<br /> <br />
<el-input <el-input
:value="title != 'elcs.101.001.01'?dialog.rcv.adrelc:dialog.rcv.pts.dizzhii" :value="
title != 'elcs.101.001.01'
? dialog.rcv.adrelc
: dialog.rcv.pts.dizzhii
"
type="textarea" type="textarea"
:rows="2" :rows="2"
/> />
...@@ -375,7 +383,11 @@ ...@@ -375,7 +383,11 @@
label="Adress Amend" label="Adress Amend"
label-width="120px" label-width="120px"
> >
<el-input type="textarea" v-model="dialog.adrblk" :rows="4" /> <el-input
type="textarea"
v-model="dialog.adrblk"
:rows="4"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-else> <el-col :span="12" v-else>
...@@ -452,7 +464,7 @@ ...@@ -452,7 +464,7 @@
<span class="dialog-footer"> <span class="dialog-footer">
<el-button <el-button
type="primary" type="primary"
@click="centerDialogVisible = false" @click="saveDialog"
>确 定</el-button >确 定</el-button
> >
<el-button @click="centerDialogVisible = false" <el-button @click="centerDialogVisible = false"
...@@ -473,6 +485,7 @@ export default { ...@@ -473,6 +485,7 @@ export default {
props: ["model", "codes"], props: ["model", "codes"],
data() { data() {
return { return {
index:0,
title: "", title: "",
dialog: { dialog: {
rcv: { rcv: {
...@@ -495,7 +508,14 @@ export default { ...@@ -495,7 +508,14 @@ export default {
}, },
}; };
}, },
methods: { ...Event }, methods: {
...Event,
saveDialog() {
this.centerDialogVisible = false;
console.log(this.model);
this.model.trnmod.trndoc.doceot.splice(this.index,1,this.dialog);
}
},
created: function () {}, created: function () {},
}; };
</script> </script>
......
...@@ -178,6 +178,7 @@ ...@@ -178,6 +178,7 @@
v-model="model.didgrp.rec.mytype" v-model="model.didgrp.rec.mytype"
style="width: 100%" style="width: 100%"
placeholder="请选择贸易类型" placeholder="请选择贸易类型"
@change="mytypeChange"
> >
<el-option <el-option
v-for="item in codes.mylx" v-for="item in codes.mylx"
...@@ -192,6 +193,7 @@ ...@@ -192,6 +193,7 @@
v-model="model.didgrp.rec.mytype" v-model="model.didgrp.rec.mytype"
style="width: 100%" style="width: 100%"
placeholder="请选择贸易类型" placeholder="请选择贸易类型"
@change="mytypeChange"
> >
<el-option <el-option
v-for="item in codes.mytype" v-for="item in codes.mytype"
...@@ -215,7 +217,25 @@ ...@@ -215,7 +217,25 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="最迟货物装运日" prop="didgrp.rec.shpdat"> <el-form-item v-if="model.didgrp.rec.mytype == 'H'" label="最迟货物装运日" prop="didgrp.rec.shpdat">
<c-date-picker
type="date"
v-model="model.didgrp.rec.shpdat"
value-format="yyyy-MM-dd"
style="width: 100%"
placeholder="请选择Shipment Date"
></c-date-picker>
</el-form-item>
<el-form-item v-if="model.didgrp.rec.mytype == 'F'" label="最迟服务提供日" prop="didgrp.rec.shpdat">
<c-date-picker
type="date"
v-model="model.didgrp.rec.shpdat"
value-format="yyyy-MM-dd"
style="width: 100%"
placeholder="请选择Shipment Date"
></c-date-picker>
</el-form-item>
<el-form-item label="最迟货物装运日/服务提供日" v-if="model.didgrp.rec.mytype == '3'" prop="didgrp.rec.shpdat">
<c-date-picker <c-date-picker
type="date" type="date"
v-model="model.didgrp.rec.shpdat" v-model="model.didgrp.rec.shpdat"
...@@ -363,6 +383,7 @@ ...@@ -363,6 +383,7 @@
<el-col :span="16"> <el-col :span="16">
<el-form-item label="Extkey" prop="didgrp.apl.pts.extkey"> <el-form-item label="Extkey" prop="didgrp.apl.pts.extkey">
<c-input <c-input
id = "extkey"
v-model="model.didgrp.apl.pts.extkey" v-model="model.didgrp.apl.pts.extkey"
maxlength="16" maxlength="16"
placeholder="请输入External Key of Address" placeholder="请输入External Key of Address"
...@@ -640,6 +661,7 @@ ...@@ -640,6 +661,7 @@
v-model="model.didgrp.beb.pts.bankno" v-model="model.didgrp.beb.pts.bankno"
maxlength="20" maxlength="20"
placeholder="请输入Number of bank" placeholder="请输入Number of bank"
@keyup.enter.native="banknoEvent"
></c-input> ></c-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -689,6 +711,8 @@ export default { ...@@ -689,6 +711,8 @@ export default {
Api.post("ditopn/executeRule/didgrp.apl.pts.extkey", data).then( Api.post("ditopn/executeRule/didgrp.apl.pts.extkey", data).then(
(res) => { (res) => {
if (res.respCode = "AAAAAA"){ if (res.respCode = "AAAAAA"){
//失去焦点,避免多次触发
document.getElementById('extkey').blur();
const data = res.data; const data = res.data;
this.model.didgrp.apl.namelc = data.didgrp_apl_namelc; this.model.didgrp.apl.namelc = data.didgrp_apl_namelc;
this.model.didgrp.apl.adrelc = data.didgrp_apl_adrelc; this.model.didgrp.apl.adrelc = data.didgrp_apl_adrelc;
...@@ -698,7 +722,6 @@ export default { ...@@ -698,7 +722,6 @@ export default {
this.model.didgrp.apl.pts.extact = data.didgrp_apl_pts_extact; //申请人账号 this.model.didgrp.apl.pts.extact = data.didgrp_apl_pts_extact; //申请人账号
this.flag = false; this.flag = false;
} }
} }
); );
}, },
...@@ -716,6 +739,41 @@ export default { ...@@ -716,6 +739,41 @@ export default {
} }
); );
}, },
banknoEvent() {
const data = Utils.flatObject(this.model);
var temp = this.model.didgrp.beb.pts.bankno;
if (temp.length < 6){
return;
}
// 011451000006
Api.post("ditopn/executeRule/didgrp.beb.pts.bankno", data).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (JSON.stringify(res.fieldErrors) != '{}'){
this.$notify({
title: '提示',
message: res.fieldErrors['didgrp.beb.pts.bankno'],
type: 'error'
});
}else{
const data = res.data;
this.model.didgrp.beb.pts.bankno = data.didgrp_beb_pts_bankno;
this.model.didgrp.beb.pts.jigomc = data.didgrp_beb_pts_jigomc;
}
}
}
)
},
mytypeChange(){
if (this.model.didgrp.rec.mytype == "F"){
this.model.didgrp.rec.tratyp = "";
this.model.didgrp.rec.sdsrfs = "";
this.model.didgrp.rec.shptrs = "";
this.model.didgrp.rec.shpfro = "";
this.model.didgrp.rec.shpto = "";
this.model.didgrp.rec.shppro = "";
}
},
}, },
created: function () {}, created: function () {},
watch: { watch: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment