2024-06-26 00:28:04 +00:00
|
|
|
<template>
|
|
|
|
|
<div >
|
2024-06-26 06:22:50 +00:00
|
|
|
<el-form ref="form" :model="form" size="mini" :rules="rules" label-width="80px">
|
2024-06-26 00:28:04 +00:00
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="运单号" prop="billCode">
|
2024-06-26 06:22:50 +00:00
|
|
|
<el-input v-model="form.billCode" clearable="" placeholder="单号输入后按回车" @keyup.enter.native="handleScanInput" >
|
|
|
|
|
<i slot="suffix" class="iconfont"></i>
|
|
|
|
|
</el-input>
|
2024-06-26 00:28:04 +00:00
|
|
|
</el-form-item>
|
2024-06-26 06:22:50 +00:00
|
|
|
|
2024-06-26 00:28:04 +00:00
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
2024-06-26 06:22:50 +00:00
|
|
|
<el-form-item label="修改项目" prop="applyType">
|
|
|
|
|
<AjustApplyTypePicker v-model="form.applyType" :disabled="isEditDisabled"></AjustApplyTypePicker>
|
2024-06-26 00:28:04 +00:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-06-26 06:22:50 +00:00
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="发送站点" prop="destConfirmSiteCode">
|
|
|
|
|
<EmisSiteSimplePicker :placeholder="$t('发送站点')" v-model="form.destConfirmSiteCode" :isInitiated="true" ></EmisSiteSimplePicker>
|
2024-06-26 00:28:04 +00:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-06-26 06:22:50 +00:00
|
|
|
|
2024-06-26 00:28:04 +00:00
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="改前值" prop="oldValue">
|
2024-06-26 06:22:50 +00:00
|
|
|
<el-input v-model="form.oldValue" placeholder="请输入改前值" disabled />
|
2024-06-26 00:28:04 +00:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="改后值" prop="newValue">
|
2024-06-26 06:22:50 +00:00
|
|
|
<el-input v-model="form.newValue" placeholder="请输入改后值" :disabled="isEditDisabled" />
|
2024-06-26 00:28:04 +00:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-06-26 06:22:50 +00:00
|
|
|
|
2024-06-26 00:28:04 +00:00
|
|
|
<el-col :span="24">
|
2024-06-26 06:22:50 +00:00
|
|
|
<el-form-item label="问题说明" prop="applyMemo">
|
|
|
|
|
<el-input v-model="form.applyMemo" type="textarea" placeholder="" :disabled="isEditDisabled"/>
|
2024-06-26 00:28:04 +00:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div style="text-align: center;margin-bottom: 10px;">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
2024-06-26 06:22:50 +00:00
|
|
|
|
2024-06-26 00:28:04 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-06-26 06:22:50 +00:00
|
|
|
import { addEmisWaybillAjustApply } from "@/api/emis/emisWaybillAjustApply";
|
|
|
|
|
import AjustApplyTypePicker from '@/views/emis/EmisBaseTools/AjustApplyTypePicker.vue';
|
|
|
|
|
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
|
|
|
|
import { getWaybillDetail} from "@/api/emis/emisWaybill";
|
2024-06-26 00:28:04 +00:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "emisWaybillAjustApplyForm",
|
|
|
|
|
props:{
|
|
|
|
|
id:{
|
|
|
|
|
type:Number
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-06-26 06:22:50 +00:00
|
|
|
components: { AjustApplyTypePicker,EmisSiteSimplePicker },
|
2024-06-26 00:28:04 +00:00
|
|
|
dicts: [
|
|
|
|
|
],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
emisWaybillAjustApplyOptions: [],
|
2024-06-26 06:22:50 +00:00
|
|
|
|
|
|
|
|
isEditDisabled:true,
|
2024-06-26 00:28:04 +00:00
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
2024-06-26 06:22:50 +00:00
|
|
|
|
|
|
|
|
billDetail:{},
|
2024-06-26 00:28:04 +00:00
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
billCode: [
|
|
|
|
|
{ required: true, message: "运单号不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
applyType: [
|
2024-06-26 06:22:50 +00:00
|
|
|
{ required: true, message: "调整类型不能为空", trigger: ["blur","change"] }
|
2024-06-26 00:28:04 +00:00
|
|
|
],
|
|
|
|
|
newValue: [
|
|
|
|
|
{ required: true, message: "改后值不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
applyMemo: [
|
2024-06-26 06:22:50 +00:00
|
|
|
{ required: true, message: "问题说明不能为空", trigger: "blur" }
|
2024-06-26 00:28:04 +00:00
|
|
|
],
|
2024-06-26 06:22:50 +00:00
|
|
|
destConfirmSiteCode: [
|
|
|
|
|
{ required: true, message: "发往站点必填", trigger: ["blur","change"] }
|
2024-06-26 00:28:04 +00:00
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
"id": {
|
|
|
|
|
handler (newValue, oldValue) {
|
|
|
|
|
this.id = newValue;
|
|
|
|
|
},
|
|
|
|
|
deep: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
2024-06-26 06:22:50 +00:00
|
|
|
async handleScanInput(){
|
|
|
|
|
if(this.form.billCode==null || this.form.billCode==''){
|
|
|
|
|
this.$message.error("输入单号后回车");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let res=await getWaybillDetail(this.form.billCode);
|
|
|
|
|
if(res.code != 200){
|
|
|
|
|
this.$message.error(res.msg);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.billDetail=res.data;
|
|
|
|
|
// console.log("====>", this.billDetail);
|
|
|
|
|
this.isEditDisabled=false;
|
|
|
|
|
|
|
|
|
|
this.form.applyManCode=this.$store.getters.empCode;
|
|
|
|
|
this.form.applySiteCode=this.$store.getters.ownerSiteCode;
|
|
|
|
|
|
|
|
|
|
if(this.billDetail.sendSiteCode == this.$store.getters.ownerSiteCode){
|
|
|
|
|
this.form.destConfirmSiteCode=this.billDetail.dispatchUnderlingSiteCode;
|
|
|
|
|
}else{
|
|
|
|
|
this.form.destConfirmSiteCode=this.billDetail.sendSiteCode;
|
|
|
|
|
}
|
2024-06-26 00:28:04 +00:00
|
|
|
},
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.$emit("on-cancel");
|
|
|
|
|
},
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
id: null,
|
|
|
|
|
billCode: null,
|
|
|
|
|
applyType: null,
|
|
|
|
|
applyManCode: null,
|
|
|
|
|
applySiteCode: null,
|
|
|
|
|
applyFinanceCenterCode: null,
|
|
|
|
|
applyDate: null,
|
|
|
|
|
blDestConfirmed: null,
|
|
|
|
|
destConfirmSiteCode: null,
|
|
|
|
|
destConfirmDate: null,
|
|
|
|
|
destConfirmNote: null,
|
|
|
|
|
destConfirmManCode: null,
|
|
|
|
|
destFinanceCenterCode: null,
|
|
|
|
|
oldValue: null,
|
|
|
|
|
newValue: null,
|
|
|
|
|
blValueJson: null,
|
|
|
|
|
applyMemo: null,
|
|
|
|
|
blCenterConfirmed: null,
|
|
|
|
|
centerConfirmSiteCode: null,
|
|
|
|
|
centerConfirmManCode: null,
|
|
|
|
|
centerConfirmDate: null,
|
|
|
|
|
centerConfirmNote: null,
|
|
|
|
|
remark: null,
|
|
|
|
|
tenantId: null,
|
|
|
|
|
delFlag: null,
|
|
|
|
|
createBy: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
updateBy: null,
|
|
|
|
|
updateTime: null,
|
|
|
|
|
createSite: null,
|
|
|
|
|
updateSite: null
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
2024-06-26 06:22:50 +00:00
|
|
|
addEmisWaybillAjustApply(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("申请成功");
|
2024-06-26 00:28:04 +00:00
|
|
|
this.$emit("on-changed");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|