This commit is contained in:
linfso 2024-06-22 16:58:25 +08:00
parent 5be4f1445b
commit e63b9d8bb0
4 changed files with 163 additions and 68 deletions

View File

@ -8,6 +8,7 @@
:remote-method="remoteDebounce" :remote-method="remoteDebounce"
v-model="svalue" v-model="svalue"
:placeholder="placeholder" :placeholder="placeholder"
auto-complete="new-password"
@blur="onBlur" @blur="onBlur"
@change="onChange" @change="onChange"

View File

@ -5,6 +5,9 @@
<el-col :span=16> <el-col :span=16>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('派件员')" prop="dispatchManCode"> <el-form-item :label="$t('派件员')" prop="dispatchManCode">
<span slot="label">
<span style="color: red">{{ $t('派件员') }}</span>
</span>
<EmisUserSimplePicker v-model="form.dispatchManCode" postCode="RSD" @onChange="onSendStaffSelect" ></EmisUserSimplePicker> <EmisUserSimplePicker v-model="form.dispatchManCode" postCode="RSD" @onChange="onSendStaffSelect" ></EmisUserSimplePicker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -552,6 +555,10 @@ export default {
this.$message.error("请先选择签收人"); this.$message.error("请先选择签收人");
return; return;
} }
if(!this.form.dispatchManCode){
this.$message.error("请先选择派件员");
return;
}
if(this.dataMap[this.form.billCode]){ if(this.dataMap[this.form.billCode]){
this.$message.error("重复扫描"); this.$message.error("重复扫描");
this.playNoticeTone(1); this.playNoticeTone(1);

View File

@ -17,7 +17,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="所属国家" prop="countryCode"> <el-form-item label="所属国家" prop="countryCode">
<CountryPicker :placeholder="$t('所属国家')" v-model="form.countryCode" ></CountryPicker> <CountryPicker :placeholder="$t('所属国家')" v-model="form.countryCode" auto-complete="new-password" ></CountryPicker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -33,7 +33,14 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item v-if="form.userId == undefined" label="用户密码" prop="password"> <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
<el-input v-model="form.password" placeholder="请输入用户密码" type="password" auto-complete="new-password" autocomplete="off" maxlength="20" show-password/> <el-input
auto-complete="new-password"
v-model="form.password"
placeholder="请输入用户密码"
type="text"
maxlength="20"
class="no-autofill-pwd"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -344,6 +351,39 @@ export default {
}); });
} }
}, },
changAttr(e, type) {
if (type === 'focus') {
if (e) {
e.stopPropagation();
e.preventDefault();
}
setTimeout(() => {
this.readonly = false;
}, 100);
} else {
if (e) {
e.stopPropagation();
}
this.readonly = true;
}
},
clickEvt() {
if (this.$refs.password) {
// this.$refs.password.$refs.input.onmousedown = (evt) => {
// if (evt) {
// evt.preventDefault();
// evt.stopPropagation();
// }
// if (this.ruleForm.password === '' || this.readonly) {
// this.$refs.password.$refs.input.blur();
// setTimeout(() => {
// this.$refs.password.$refs.input.focus();
// }, 0);
// }
// return false;
// };
}
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.reset(); this.reset();
@ -467,4 +507,8 @@ export default {
font-size: 12px!important; font-size: 12px!important;
font-weight: bold!important; font-weight: bold!important;
} }
.no-autofill-pwd{
-webkit-text-security: disc !important;
}
</style> </style>

View File

@ -12,16 +12,6 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16">
</el-col>
<el-col :span="8">
<el-form-item :label="$t('通知网点')" prop="notifySite" label-width="80px">
<!-- <EmisSiteSimplePicker v-model="form.notifySite" @onChange="onScanSiteSelect" ></EmisSiteSimplePicker> -->
<el-select v-model="form.notifySiteCode" @change="onScanSiteSelect">
<el-option v-for="item in notifySiteDataSource" :key="item.notifySiteCode" :value="item.notifySiteCode" :label="item.notifySiteName" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="$t('问题类型')" prop="problemType" label-width="80px"> <el-form-item :label="$t('问题类型')" prop="problemType" label-width="80px">
<span slot="label"> <span slot="label">
@ -30,6 +20,17 @@
<ProblemTypePicker v-model="form.problemId" @onChange="onproblemTypeSelect" ></ProblemTypePicker> <ProblemTypePicker v-model="form.problemId" @onChange="onproblemTypeSelect" ></ProblemTypePicker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
</el-col>
<el-col :span="8">
<el-form-item :label="$t('通知网点')" prop="notifySite" label-width="80px">
<!-- <EmisSiteSimplePicker v-model="form.notifySite" @onChange="onScanSiteSelect" ></EmisSiteSimplePicker> -->
<el-select v-model="form.notifySiteCode" @change="onScanSiteSelect">
<el-option v-for="item in notifySiteDataSource" :key="item.notifySiteCode" :value="item.notifySiteCode" :label="item.notifySiteName" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="问题原因" prop="remark" label-width="80px"> <el-form-item label="问题原因" prop="remark" label-width="80px">
<span slot="label"> <span slot="label">
@ -38,6 +39,7 @@
<el-input <el-input
v-model="form.remark" v-model="form.remark"
type="textarea" type="textarea"
rows="3"
:placeholder="$t('请输入')" :placeholder="$t('请输入')"
clearable clearable
/> />
@ -142,8 +144,8 @@
<el-table-column :label="$t('问题件类型')" align="center" prop="problemTypeName" min-width="100" /> <el-table-column :label="$t('问题件类型')" align="center" prop="problemTypeName" min-width="100" />
<el-table-column :label="$t('登记人')" align="center" prop="scanMan" min-width="150" /> <el-table-column :label="$t('登记人')" align="center" prop="scanMan" min-width="150" />
<el-table-column :label="$t('图片路径')" align="center" prop="picUrl" min-width="100"> <el-table-column :label="$t('图片路径')" align="center" prop="picUrl" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{scope.row.picUrl}}</span> <ImagePreview height="50px" v-for="pic in (scope.row.picUrl||'').split(',')" :key="pic" :src="pic" ></ImagePreview>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('问题件原因')" align="center" prop="remark" min-width="170"> <el-table-column :label="$t('问题件原因')" align="center" prop="remark" min-width="170">
@ -194,6 +196,8 @@
import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo"; import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
import { doScan } from "@/api/emis/emisTmsScanRecord"; import { doScan } from "@/api/emis/emisTmsScanRecord";
import { listEmisWaybill } from "@/api/emis/emisWaybill"; import { listEmisWaybill } from "@/api/emis/emisWaybill";
import { getWaybillDetail} from "@/api/emis/emisWaybill";
// import { getWaybillDetail } from "@/api/emis/emisWaybill"; // import { getWaybillDetail } from "@/api/emis/emisWaybill";
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue'; import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue'; import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue';
@ -353,66 +357,105 @@ export default {
this.$message.error("请先选择数据") this.$message.error("请先选择数据")
} }
}, },
handleScanInput(){ async handleScanInput(){
if(this.form.billCode==null || this.form.billCode==''){ if(this.form.billCode==null || this.form.billCode==''){
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
// this.getWaybill(this.form.billCode) // this.getWaybill(this.form.billCode)
this.loading = true; // this.loading = true;
listEmisWaybill({billCode:this.form.billCode}).then(response => {
this.loading = false; let res=await getWaybillDetail(this.form.billCode);
let scanDate = new Date(); // this.loading = false;
if(response.code != 200){ if(res.code != 200){
this.$message.error(response.msg); this.$message.error(res.msg);
return; return;
}
let scanDate = new Date();
let rsItem = res.data;
console.log(rsItem);
this.tempRecord =Object.assign({}, rsItem)
// tempRecord.notifySite = tempRecord.sendSiteCode;
// tempRecord.notifySiteName = tempRecord.sendSiteName;
this.tempRecord.scanSiteCode=this.form.scanSiteCode;
this.tempRecord.scanSite=this.form.scanSite;
this.tempRecord.scanDate=scanDate;
this.tempRecord.scanMan=this.form.scanMan;
this.tempRecord.scanManCode=this.form.scanManCode;
this.tempRecord.dataFrom="PC";
this.notifySiteDataSource=[
{
notifySiteCode:this.tempRecord.sendSiteCode,
notifySiteName:this.tempRecord.sendSiteName,
},
{
notifySiteCode:this.tempRecord.dispatchUnderlingSiteCode,
notifySiteName:this.tempRecord.dispatchUnderlingSiteName,
} }
let rows = response.rows; ]
if(!rows || rows.length == 0){ if(this.tempRecord.sendSiteCode == this.$store.getters.ownerSiteCode){
this.$message.error("未查到单号"); this.form.notifySiteCode = this.tempRecord.dispatchUnderlingSiteCode;
this.form.billCode=null; this.form.notifySiteName = this.tempRecord.dispatchUnderlingSiteName;
return; }
} else{
if(rows.length>0) { this.form.notifySiteCode = this.tempRecord.sendSiteCode;
let rsItem = rows[0]; this.form.notifySiteName = this.tempRecord.sendSiteName;
console.log(rsItem); }
this.tempRecord =Object.assign({}, rsItem)
// tempRecord.notifySite = tempRecord.sendSiteCode; // listEmisWaybill({billCode:this.form.billCode}).then(response => {
// tempRecord.notifySiteName = tempRecord.sendSiteName; // this.loading = false;
this.tempRecord.scanSiteCode=this.form.scanSiteCode; // let scanDate = new Date();
this.tempRecord.scanSite=this.form.scanSite; // if(response.code != 200){
this.tempRecord.scanDate=scanDate; // this.$message.error(response.msg);
this.tempRecord.scanMan=this.form.scanMan; // return;
this.tempRecord.scanManCode=this.form.scanManCode; // }
this.tempRecord.dataFrom="PC"; // let rows = response.rows;
this.notifySiteDataSource=[ // if(!rows || rows.length == 0){
{ // this.$message.error("未查到单号");
notifySiteCode:this.tempRecord.sendSiteCode, // this.form.billCode=null;
notifySiteName:this.tempRecord.sendSiteName, // return;
}, // }
{ // if(rows.length>0) {
notifySiteCode:this.tempRecord.dispatchUnderlingSiteCode, // let rsItem = rows[0];
notifySiteName:this.tempRecord.dispatchUnderlingSiteName, // console.log(rsItem);
} // this.tempRecord =Object.assign({}, rsItem)
] // // tempRecord.notifySite = tempRecord.sendSiteCode;
if(this.tempRecord.sendSiteCode == this.$store.getters.ownerSiteCode){ // // tempRecord.notifySiteName = tempRecord.sendSiteName;
this.form.notifySiteCode = this.tempRecord.dispatchUnderlingSiteCode; // this.tempRecord.scanSiteCode=this.form.scanSiteCode;
this.form.notifySiteName = this.tempRecord.dispatchUnderlingSiteName; // this.tempRecord.scanSite=this.form.scanSite;
} // this.tempRecord.scanDate=scanDate;
// else if(this.tempRecord.dispatchUnderlingSiteCode == this.$store.getters.ownerSiteCode){ // this.tempRecord.scanMan=this.form.scanMan;
// this.form.notifySiteCode = this.tempRecord.sendSiteCode; // this.tempRecord.scanManCode=this.form.scanManCode;
// this.form.notifySiteName = this.tempRecord.sendSiteName; // this.tempRecord.dataFrom="PC";
// } // this.notifySiteDataSource=[
else{ // {
this.form.notifySiteCode = this.tempRecord.sendSiteCode; // notifySiteCode:this.tempRecord.sendSiteCode,
this.form.notifySiteName = this.tempRecord.sendSiteName; // notifySiteName:this.tempRecord.sendSiteName,
} // },
// this.billInputDisabled = true; // {
// this.emisWaybillList.push(tempRecord); // notifySiteCode:this.tempRecord.dispatchUnderlingSiteCode,
// this.dataMap[this.form.billCode]=tempRecord; // notifySiteName:this.tempRecord.dispatchUnderlingSiteName,
} // }
// this.form.billCode=null; // ]
}) // if(this.tempRecord.sendSiteCode == this.$store.getters.ownerSiteCode){
// this.form.notifySiteCode = this.tempRecord.dispatchUnderlingSiteCode;
// this.form.notifySiteName = this.tempRecord.dispatchUnderlingSiteName;
// }
// // else if(this.tempRecord.dispatchUnderlingSiteCode == this.$store.getters.ownerSiteCode){
// // this.form.notifySiteCode = this.tempRecord.sendSiteCode;
// // this.form.notifySiteName = this.tempRecord.sendSiteName;
// // }
// else{
// this.form.notifySiteCode = this.tempRecord.sendSiteCode;
// this.form.notifySiteName = this.tempRecord.sendSiteName;
// }
// // this.billInputDisabled = true;
// // this.emisWaybillList.push(tempRecord);
// // this.dataMap[this.form.billCode]=tempRecord;
// }
// // this.form.billCode=null;
// })
}, },
handleRegister(){ handleRegister(){
if(this.form.notifySiteCode==null || this.form.notifySiteCode==''){ if(this.form.notifySiteCode==null || this.form.notifySiteCode==''){