Commit 13783e1f authored by 我在何方's avatar 我在何方

收款单bug修复

parent 9bed04d8
......@@ -13,12 +13,11 @@
<!-- <el-descriptions :column="3" border>-->
<!-- <el-descriptions-item > -->
<el-form-item
:label="$t('客户')"
style="margin-bottom: 0;margin-top: 20px;"
prop="customerId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('客户不能为空') }"
>
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('客户')}}</span>
<customer-selector
v-model="form.customerId"
@change="customerChange"
......@@ -27,12 +26,11 @@
<!-- </el-descriptions-item>
<el-descriptions-item > -->
<el-form-item
:label="$t('部门')"
style="margin-bottom: 0;margin-top: 20px;"
prop="departmentId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('部门不能为空') }"
>
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('部门')}}:</span>
<el-select
v-model="form.departmentId"
style="width: 300px"
......@@ -47,12 +45,11 @@
</el-select>
</el-form-item>
<el-form-item
:label="$t('业务员')"
style="margin-bottom: 0;margin-top: 20px;"
prop="salesmanId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('业务员不能为空') }"
>
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('业务员')}}:</span>
<el-select v-model="form.salesmanId" filterable :placeholder="$t('请选择业务员')" @change="v => form.salesmanName = creatorData.find(t => t.id === v).nickname">
<el-option
v-for="item in creatorData"
......@@ -78,11 +75,12 @@
<!-- </el-descriptions-item>
<el-descriptions-item > -->
<el-form-item
:label="$t('备注')"
:label="$t('备注')+':'"
style="margin-bottom: 0;margin-top: 20px;"
label-width="55px"
prop="remark"
>
<el-input v-model="form.remark" :placeholder="$t('备注')"></el-input>
<el-input style="display:inline-block;" v-model="form.remark" :placeholder="$t('备注')"></el-input>
</el-form-item>
<!-- </el-descriptions-item> -->
<!-- </el-descriptions> -->
......@@ -163,12 +161,10 @@
<!-- <el-descriptions :column="2" border class="card">
<el-descriptions-item > -->
<el-form-item
:label="$t('是否需要开票')+':'"
style="margin-bottom: 0;margin-top: 20px;"
prop="openInvoice"
required
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('请选择是否需要开票') }"
>
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('是否需要开票')}}:</span>
<el-select
v-model="form.openInvoice"
:placeholder="$t('请选择是否需要开票')"
......@@ -867,13 +863,6 @@ export default {
});
},
computed: {
rules(){
return {
customerId : [{required: true, message: this.$t('客户不能为空')}],
departmentId : [{required: true, message: this.$t('部门不能为空')}],
salesmanId: [{required: true, message: this.$t('业务员不能为空')}],
}
},
expoerCityList() {
// return this.tradeCityList.filter((item) => item.type == 2);
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
......@@ -1260,13 +1249,27 @@ export default {
submitForm(addType) {
const params = {...this.form}
params.addType = addType
this.$refs["form"].validate((valid, errors) => {
if (!valid) {
return this.$showFormValidateErrors(errors)
}
})
// params.receiptAccountList = params.receiptAccountList.map(v => Object.assign(v, { }))
if(!params.customerId){
this.saveBtnLoading = false
this.$modal.msgError(this.$t('客户不能为空'));
return
}
if(!params.departmentId){
this.saveBtnLoading = false
this.$modal.msgError(this.$t('部门不能为空'));
return
}
if(!params.salesmanId){
this.saveBtnLoading = false
this.$modal.msgError(this.$t('业务员不能为空'));
return
}
if(!params.openInvoice){
this.saveBtnLoading = false
this.$modal.msgError(this.$t('请选择是否需要开票'));
return
}
if (this.list && this.list.length > 0) {
params.receivableVOList = this.list
}else{
......
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