|
@@ -5,8 +5,11 @@ |
|
@@ -5,8 +5,11 @@ |
|
5
|
<a-form-model ref="form" :model="model" :rules="validatorRules">
|
5
|
<a-form-model ref="form" :model="model" :rules="validatorRules">
|
|
6
|
<a-row>
|
6
|
<a-row>
|
|
7
|
<a-col :span="24">
|
7
|
<a-col :span="24">
|
|
8
|
- <a-form-model-item label="订货单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCompany">
|
|
|
|
9
|
- <a-input v-model="model.orderCompany" placeholder="请输入订货单位"></a-input>
|
8
|
+ <a-form-model-item label="订货单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCompany" >
|
|
|
|
9
|
+ <!-- <a-input v-model="model.orderCompany" placeholder="请输入订货单位"></a-input> -->
|
|
|
|
10
|
+ <a-select size="small" v-model="model.orderCompany" placeholder="请输入订货单位" allowClear show-search :filter-option="filterOption" mode="SECRET_COMBOBOX_MODE_DO_NOT_USE">
|
|
|
|
11
|
+ <a-select-option v-for="(item,index) in orderCompanyList" :key="index" :value="item">{{ item }}</a-select-option>
|
|
|
|
12
|
+ </a-select>
|
|
10
|
</a-form-model-item>
|
13
|
</a-form-model-item>
|
|
11
|
</a-col>
|
14
|
</a-col>
|
|
12
|
<a-col :span="24">
|
15
|
<a-col :span="24">
|
|
@@ -16,7 +19,10 @@ |
|
@@ -16,7 +19,10 @@ |
|
16
|
</a-col>
|
19
|
</a-col>
|
|
17
|
<a-col :span="24">
|
20
|
<a-col :span="24">
|
|
18
|
<a-form-model-item label="产品名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
|
21
|
<a-form-model-item label="产品名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
|
|
19
|
- <a-input v-model="model.productName" placeholder="请输入产品名称"></a-input>
|
22
|
+ <!-- <a-input v-model="model.productName" placeholder="请输入产品名称"></a-input> -->
|
|
|
|
23
|
+ <a-select size="small" v-model="model.productName" placeholder="请输入产品名称" allowClear show-search :filter-option="filterOptionProductName" mode="SECRET_COMBOBOX_MODE_DO_NOT_USE">
|
|
|
|
24
|
+ <a-select-option v-for="(item,index) in productNameList" :key="index" :value="item">{{ item }}</a-select-option>
|
|
|
|
25
|
+ </a-select>
|
|
20
|
</a-form-model-item>
|
26
|
</a-form-model-item>
|
|
21
|
</a-col>
|
27
|
</a-col>
|
|
22
|
<a-col :span="24">
|
28
|
<a-col :span="24">
|
|
@@ -74,7 +80,7 @@ |
|
@@ -74,7 +80,7 @@ |
|
74
|
import { httpAction } from '@/api/manage'
|
80
|
import { httpAction } from '@/api/manage'
|
|
75
|
import { validateDuplicateValue } from '@/utils/util'
|
81
|
import { validateDuplicateValue } from '@/utils/util'
|
|
76
|
import { duplicateCheck } from '@/api/api'
|
82
|
import { duplicateCheck } from '@/api/api'
|
|
77
|
-import {listProductType} from '@/api/ProductTpye'
|
83
|
+import {listProductType,getOrderCompanyList,getProductNameList} from '@/api/ProductTpye'
|
|
78
|
import moment from 'moment'
|
84
|
import moment from 'moment'
|
|
79
|
|
85
|
|
|
80
|
export default {
|
86
|
export default {
|
|
@@ -128,14 +134,16 @@ export default { |
|
@@ -128,14 +134,16 @@ export default { |
|
128
|
url: {
|
134
|
url: {
|
|
129
|
add: "/order_form/tblOrderForm/add",
|
135
|
add: "/order_form/tblOrderForm/add",
|
|
130
|
edit: "/order_form/tblOrderForm/edit",
|
136
|
edit: "/order_form/tblOrderForm/edit",
|
|
131
|
- }
|
|
|
|
132
|
-
|
137
|
+ },
|
|
|
|
138
|
+ productNameList:[],
|
|
|
|
139
|
+ orderCompanyList:[]
|
|
133
|
}
|
140
|
}
|
|
134
|
},
|
141
|
},
|
|
135
|
created() {
|
142
|
created() {
|
|
136
|
// this.model.status = '未下单'
|
143
|
// this.model.status = '未下单'
|
|
137
|
//备份model原始值
|
144
|
//备份model原始值
|
|
138
|
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
145
|
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
|
|
|
146
|
+
|
|
139
|
},
|
147
|
},
|
|
140
|
methods: {
|
148
|
methods: {
|
|
141
|
add() {
|
149
|
add() {
|
|
@@ -145,6 +153,8 @@ export default { |
|
@@ -145,6 +153,8 @@ export default { |
|
145
|
this.model = Object.assign({}, record);
|
153
|
this.model = Object.assign({}, record);
|
|
146
|
this.visible = true;
|
154
|
this.visible = true;
|
|
147
|
this.loadTree()
|
155
|
this.loadTree()
|
|
|
|
156
|
+ this.loadOrderCompanyList()
|
|
|
|
157
|
+ this.loadProductNameList()
|
|
148
|
},
|
158
|
},
|
|
149
|
loadTree(){
|
159
|
loadTree(){
|
|
150
|
var that = this;
|
160
|
var that = this;
|
|
@@ -155,6 +165,46 @@ export default { |
|
@@ -155,6 +165,46 @@ export default { |
|
155
|
}
|
165
|
}
|
|
156
|
});
|
166
|
});
|
|
157
|
},
|
167
|
},
|
|
|
|
168
|
+ loadOrderCompanyList(){
|
|
|
|
169
|
+ getOrderCompanyList().then((res)=>{
|
|
|
|
170
|
+ if(res.success){
|
|
|
|
171
|
+ this.orderCompanyList = res.result
|
|
|
|
172
|
+ console.log('getOrderCompanyList',res)
|
|
|
|
173
|
+ }
|
|
|
|
174
|
+ });
|
|
|
|
175
|
+ },
|
|
|
|
176
|
+ loadProductNameList(){
|
|
|
|
177
|
+ getProductNameList().then((res)=>{
|
|
|
|
178
|
+ if(res.success){
|
|
|
|
179
|
+ this.productNameList = res.result
|
|
|
|
180
|
+ console.log('getProductNameList',res)
|
|
|
|
181
|
+ }
|
|
|
|
182
|
+ });
|
|
|
|
183
|
+ },
|
|
|
|
184
|
+ filterOption(input, option) {
|
|
|
|
185
|
+ // console.log(input)
|
|
|
|
186
|
+ // var temp = option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
187
|
+ // if(temp){
|
|
|
|
188
|
+ // return temp
|
|
|
|
189
|
+ // }else{
|
|
|
|
190
|
+ // this.model.orderCompany = input
|
|
|
|
191
|
+ // }
|
|
|
|
192
|
+ return (
|
|
|
|
193
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
194
|
+ );
|
|
|
|
195
|
+ },
|
|
|
|
196
|
+ filterOptionProductName(input, option) {
|
|
|
|
197
|
+ // console.log(input)
|
|
|
|
198
|
+ // var temp = option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
199
|
+ // if(temp){
|
|
|
|
200
|
+ // return temp
|
|
|
|
201
|
+ // }else{
|
|
|
|
202
|
+ // this.model.productName = input
|
|
|
|
203
|
+ // }
|
|
|
|
204
|
+ return (
|
|
|
|
205
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
206
|
+ );
|
|
|
|
207
|
+ },
|
|
158
|
close() {
|
208
|
close() {
|
|
159
|
this.$emit('close');
|
209
|
this.$emit('close');
|
|
160
|
this.visible = false;
|
210
|
this.visible = false;
|
|
@@ -165,10 +215,10 @@ export default { |
|
@@ -165,10 +215,10 @@ export default { |
|
165
|
// 触发表单验证
|
215
|
// 触发表单验证
|
|
166
|
this.$refs.form.validate(valid => {
|
216
|
this.$refs.form.validate(valid => {
|
|
167
|
if (valid) {
|
217
|
if (valid) {
|
|
168
|
- if(!this.model.pics && !this.model.files){
|
|
|
|
169
|
- this.$message.warning("请上传主料图片或主料图文件!")
|
|
|
|
170
|
- return
|
|
|
|
171
|
- }
|
218
|
+ //if(!this.model.pics && !this.model.files){
|
|
|
|
219
|
+ //this.$message.warning("请上传主料图片或主料图文件!")
|
|
|
|
220
|
+ //return
|
|
|
|
221
|
+ //}
|
|
172
|
// console.log(this.model)
|
222
|
// console.log(this.model)
|
|
173
|
// return
|
223
|
// return
|
|
174
|
that.confirmLoading = true;
|
224
|
that.confirmLoading = true;
|