|
|
|
@ -127,51 +127,83 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-divider></el-divider>
|
|
|
|
|
<el-row :gutter="24" class="el-row">
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item label="往来单位类型:" prop="corpType" class="query-form-item">
|
|
|
|
|
<el-select v-model="formData.corpType" style="width: 80%" placeholder="选择往来单位类型"
|
|
|
|
|
@change="corpTypeChange"
|
|
|
|
|
<el-form-item label="发货方:" prop="shipper" class="query-form-item">
|
|
|
|
|
<el-select v-model="formData.shipper" style="width: 80%" placeholder="选择发货方"
|
|
|
|
|
@change="changeShipper" :disabled="formData.shipper == 3"
|
|
|
|
|
>
|
|
|
|
|
<el-option label="供应商" :value="2"></el-option>
|
|
|
|
|
<el-option label="客户" :value="1"></el-option>
|
|
|
|
|
<el-option label="特殊往来" :value="4"></el-option>
|
|
|
|
|
<el-option label="内部科室" :value="3"></el-option>
|
|
|
|
|
<el-option label="填写" :value="5"></el-option>
|
|
|
|
|
<el-option label="原始单据的发货方" :value="1" v-if="formData.scanType != 1"></el-option>
|
|
|
|
|
<el-option label="原始单据的收货方" :value="2" v-if="formData.scanType != 1"></el-option>
|
|
|
|
|
<el-option label="用户所属仓库" :value="3" v-if="formData.scanType == 1"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item label="往来类型标题:" prop="unitTittle" class="query-form-item">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="formData.unitTittle" style="width: 80%"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
placeholder="请输入往来类型标题"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="24" class="el-row">
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item label="默认仓库:" prop="invCode" class="query-form-item">
|
|
|
|
|
<el-select v-model="formData.invCode" placeholder="请选择仓库"
|
|
|
|
|
style="width: 80%"
|
|
|
|
|
clearable
|
|
|
|
|
<el-form-item label="收获方:" prop="consignee" class="query-form-item">
|
|
|
|
|
<el-select v-model="formData.consignee" style="width: 80%" placeholder="选择收货方"
|
|
|
|
|
@change="changeConsignee"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in invList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
>
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
<div v-if="formData.shipper != 3">
|
|
|
|
|
<el-option label="原始单据的收货方" :value="1"></el-option>
|
|
|
|
|
<el-option label="原始单据的发货方" :value="2"></el-option>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
<el-option label="供应商" :value="3"></el-option>
|
|
|
|
|
<el-option label="客户" :value="4"></el-option>
|
|
|
|
|
<el-option label="特殊往来" :value="5"></el-option>
|
|
|
|
|
<el-option label="内部科室" :value="6"></el-option>
|
|
|
|
|
<el-option label="填写" :value="7"></el-option>
|
|
|
|
|
</div>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<!--<el-divider></el-divider>-->
|
|
|
|
|
<!--<el-row :gutter="24" class="el-row">-->
|
|
|
|
|
<!-- <el-col :span="12" class="el-col">-->
|
|
|
|
|
<!-- <el-form-item label="往来单位类型:" prop="corpType" class="query-form-item">-->
|
|
|
|
|
<!-- <el-select v-model="formData.corpType" style="width: 80%" placeholder="选择往来单位类型"-->
|
|
|
|
|
<!-- @change="corpTypeChange"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <el-option label="供应商" :value="2"></el-option>-->
|
|
|
|
|
<!-- <el-option label="客户" :value="1"></el-option>-->
|
|
|
|
|
<!-- <el-option label="特殊往来" :value="4"></el-option>-->
|
|
|
|
|
<!-- <el-option label="内部科室" :value="3"></el-option>-->
|
|
|
|
|
<!-- <el-option label="填写" :value="5"></el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="12" class="el-col">-->
|
|
|
|
|
<!-- <el-form-item label="往来类型标题:" prop="unitTittle" class="query-form-item">-->
|
|
|
|
|
<!-- <el-input-->
|
|
|
|
|
<!-- v-model="formData.unitTittle" style="width: 80%"-->
|
|
|
|
|
<!-- auto-complete="off"-->
|
|
|
|
|
<!-- placeholder="请输入往来类型标题"-->
|
|
|
|
|
<!-- ></el-input>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!--</el-row>-->
|
|
|
|
|
<!--<el-row :gutter="24" class="el-row">-->
|
|
|
|
|
<!-- <el-col :span="12" class="el-col">-->
|
|
|
|
|
<!-- <el-form-item label="默认仓库:" prop="invCode" class="query-form-item">-->
|
|
|
|
|
<!-- <el-select v-model="formData.invCode" placeholder="请选择仓库"-->
|
|
|
|
|
<!-- style="width: 80%"-->
|
|
|
|
|
<!-- clearable-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
<!-- v-for="item in invList"-->
|
|
|
|
|
<!-- :key="item.name"-->
|
|
|
|
|
<!-- :label="item.name"-->
|
|
|
|
|
<!-- :value="item.code"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <span style="float: left">{{ item.name }}</span>-->
|
|
|
|
|
<!-- </el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!--</el-row>-->
|
|
|
|
|
<el-row :gutter="24" class="el-row">
|
|
|
|
|
<el-col class="el-col">
|
|
|
|
|
<el-form-item label="备注:" prop="remark" class="query-form-item">
|
|
|
|
@ -268,6 +300,8 @@ export default {
|
|
|
|
|
overCount: 1,
|
|
|
|
|
checkBatchInsert: 2,
|
|
|
|
|
number: 1,
|
|
|
|
|
shipper: 1,
|
|
|
|
|
consignee: 1,
|
|
|
|
|
},
|
|
|
|
|
invList: [],
|
|
|
|
|
busTypes: [],
|
|
|
|
@ -303,6 +337,7 @@ export default {
|
|
|
|
|
unitTittle: [
|
|
|
|
|
// { required: true, message: '请输入往来类型标题', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
consignee: []
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -440,24 +475,43 @@ export default {
|
|
|
|
|
updateFormRules() {
|
|
|
|
|
if (this.formData.scanType === 1) {
|
|
|
|
|
// 设置校验规则
|
|
|
|
|
this.$set(this.formRules.corpType, 0, {required: true, message: '请选择往来单位类型', trigger: 'blur'});
|
|
|
|
|
this.$set(this.formRules.unitTittle, 0, {required: true, message: '请输入往来类型标题', trigger: 'blur'});
|
|
|
|
|
this.$set(this.formRules.invCode, 0, {required: true, message: '请选择仓库', trigger: 'blur'});
|
|
|
|
|
// this.$set(this.formRules.corpType, 0, {required: true, message: '请选择往来单位类型', trigger: 'blur'});
|
|
|
|
|
// this.$set(this.formRules.unitTittle, 0, {required: true, message: '请输入往来类型标题', trigger: 'blur'});
|
|
|
|
|
// this.$set(this.formRules.invCode, 0, {required: true, message: '请选择仓库', trigger: 'blur'});
|
|
|
|
|
this.$set(this.formRules.consignee, 0, {required: true, message: '请选择收收货方', trigger: 'blur'});
|
|
|
|
|
} else {
|
|
|
|
|
this.$set(this.formRules.corpType, 0, {required: false});
|
|
|
|
|
this.$set(this.formRules.unitTittle, 0, {required: false});
|
|
|
|
|
this.$set(this.formRules.invCode, 0, {required: false});
|
|
|
|
|
// this.$set(this.formRules.corpType, 0, {required: false});
|
|
|
|
|
// this.$set(this.formRules.unitTittle, 0, {required: false});
|
|
|
|
|
this.$set(this.formRules.consignee, 0, {required: false});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
changeCheckInsert() {
|
|
|
|
|
this.formData.shipper = ""
|
|
|
|
|
this.formData.consignee = ""
|
|
|
|
|
if (this.formData.scanType == 1) {
|
|
|
|
|
this.formData.checkInsert = 1
|
|
|
|
|
this.formData.shipper = 3
|
|
|
|
|
} else {
|
|
|
|
|
this.formData.consignee = 1
|
|
|
|
|
this.formData.shipper = 1
|
|
|
|
|
this.formData.checkInsert = 2
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
changeShipper(){
|
|
|
|
|
if (this.formData.shipper == 1) {
|
|
|
|
|
this.formData.consignee = 1
|
|
|
|
|
} else {
|
|
|
|
|
this.formData.consignee = 2
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
changeConsignee(){
|
|
|
|
|
if (this.formData.consignee == 1) {
|
|
|
|
|
this.formData.shipper = 1
|
|
|
|
|
} else if(this.formData.consignee == 2) {
|
|
|
|
|
this.formData.shipper = 2
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
// 监听scanType的变化,以更新校验规则
|
|
|
|
|