|
...
|
...
|
@@ -24,8 +24,8 @@ |
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="外购件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
|
|
|
|
<a-input v-model="model.productName" placeholder="请输入外购件名称" v-if="model.chooseStatus ==1"></a-input>
|
|
|
|
<a-select size="small" v-model="model.productName" placeholder="请选择外购件" allowClear @change = "handleChange" v-if="model.chooseStatus ==0">
|
|
|
|
<a-select-option v-for="(item,index) in materialOptions" :key="index" :value="item.partNumber" :channel="item">{{ item.productName }}</a-select-option>
|
|
|
|
<a-select size="small" v-model="model.productName" placeholder="请选择外购件" show-search :filter-option="filterOption" allowClear @change = "handleChange" v-if="model.chooseStatus ==0" >
|
|
|
|
<a-select-option v-for="(item,index) in materialOptions" :key="index" :value="item.partNumber" :channel="item">{{ item.productName }} - {{ item.spec }} - {{ item.type }}</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
...
|
...
|
@@ -139,9 +139,9 @@ export default { |
|
|
|
type: [
|
|
|
|
{ required: true, message: '请输入型号!' },
|
|
|
|
],
|
|
|
|
danwei: [
|
|
|
|
{ required: true, message: '请输入单位!' },
|
|
|
|
],
|
|
|
|
// danwei: [
|
|
|
|
// { required: true, message: '请输入单位!' },
|
|
|
|
// ],
|
|
|
|
num: [
|
|
|
|
{ required: true, message: '请输入数量!' },
|
|
|
|
],
|
|
...
|
...
|
@@ -183,10 +183,16 @@ export default { |
|
|
|
this.visible = true;
|
|
|
|
this.loadTree()
|
|
|
|
},
|
|
|
|
filterOption(input, option) {
|
|
|
|
return (
|
|
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
);
|
|
|
|
},
|
|
|
|
loadTree(){
|
|
|
|
httpAction(this.url.listAllMaterial,null, "get").then((res) => {
|
|
|
|
if (res.success) {
|
|
|
|
this.materialOptions = res.result
|
|
|
|
console.log('materialOptions',this.materialOptions)
|
|
|
|
} else {
|
|
|
|
// that.$message.warning(res.message);
|
|
|
|
}
|
...
|
...
|
|