|
@@ -55,11 +55,21 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="购买方" prop="customer_code">
|
|
|
- <el-input
|
|
|
+ <!-- <el-form-item label="购买方" prop="customer_code"> -->
|
|
|
+ <search-customer
|
|
|
+ :value="ruleForm.customer_code"
|
|
|
+ :names="ruleForm.customer_name"
|
|
|
+ :placeholder="'购买方公司'"
|
|
|
+ @searchChange="customerChange"
|
|
|
+ :disabled="false"
|
|
|
+ :is-detail="true"
|
|
|
+ />
|
|
|
+ <!-- </el-form-item> -->
|
|
|
+ <!-- <el-input
|
|
|
v-model="ruleForm.customer_name"
|
|
|
placeholder="购买方公司"
|
|
|
disabled
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
@@ -150,11 +160,7 @@
|
|
|
width="110"
|
|
|
/>
|
|
|
|
|
|
- <el-table-column
|
|
|
- prop="contactor"
|
|
|
- label="收件联系人"
|
|
|
- width="110"
|
|
|
- />
|
|
|
+ <el-table-column prop="contactor" label="收件联系人" width="110" />
|
|
|
|
|
|
<el-table-column prop="mobile" label="收货联系电话" width="110" />
|
|
|
|
|
@@ -377,7 +383,17 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ customerChange(e) {
|
|
|
+ if (e && e.id) {
|
|
|
+ this.ruleForm.customer_code = [e.code];
|
|
|
+ this.ruleForm.customer_name = e.label;
|
|
|
+ } else {
|
|
|
+ this.ruleForm.customer_code = [];
|
|
|
+ this.ruleForm.customer_name = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$refs.ruleForm.validateField("customer_code");
|
|
|
+ },
|
|
|
async supplierChange(e) {
|
|
|
if (e && e.id) {
|
|
|
this.ruleForm.supplierNo = [e.code];
|
|
@@ -430,7 +446,7 @@ export default {
|
|
|
this.sitem;
|
|
|
this.ruleForm = {
|
|
|
zxNo: zxNo || "",
|
|
|
- customer_code: khNo || "",
|
|
|
+ customer_code: khNo ? [khNo] : [],
|
|
|
customer_name: khname || "",
|
|
|
class_cat: class_cat || "",
|
|
|
goods_name: cpName || "",
|
|
@@ -535,7 +551,7 @@ export default {
|
|
|
}
|
|
|
const model = {
|
|
|
zxNo: zxNo || "",
|
|
|
- customer_code: customer_code || "",
|
|
|
+ customer_code: customer_code.length === 1 ? customer_code[0] : "",
|
|
|
good_num: good_num || "",
|
|
|
supplierNo: supplierNo.length > 0 ? supplierNo[0] : "",
|
|
|
sendtype: sendtype | "",
|