|
|
@ -55,51 +55,150 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
width="600px" |
|
|
|
|
|
:title="!dataForm.id ? '添加' :'编辑'" |
|
|
|
|
|
|
|
|
width="50%" |
|
|
|
|
|
:title="!dataForm.id ? '新增' :'编辑'" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-click-modal="false" |
|
|
|
|
|
@close="closeDataFromDialog" |
|
|
:visible.sync="visible"> |
|
|
:visible.sync="visible"> |
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole"> |
|
|
|
|
|
<el-form-item :label="'项目料号'"> |
|
|
|
|
|
<el-input v-model="dataForm.testPartNo" style="width: 130px" disabled></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<!-- <el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">--> |
|
|
|
|
|
<!-- <el-form-item :label="'项目料号'">--> |
|
|
|
|
|
<!-- <el-input v-model="dataForm.testPartNo" style="width: 130px" disabled></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
|
<el-form-item prop="partTypeDesc" :rules="dataRole.partTypeDesc"> |
|
|
|
|
|
<span slot="label" style="" @click="getBaseList(1013,1)"><a herf="#">物料类别</a></span> |
|
|
|
|
|
<el-input v-model="dataForm.partTypeDesc" style="width: 130px" readonly @focus="getBaseList(1013,1)" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label=" "> |
|
|
|
|
|
<span slot="label" style="" @click="getBaseList(19,1)"><a herf="#">属性模板</a></span> |
|
|
|
|
|
<el-input v-model="dataForm.codeNo" style="width: 130px" readonly @focus="getBaseList(19,1)"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<!-- <el-form-item prop="partTypeDesc" :rules="dataRole.partTypeDesc">--> |
|
|
|
|
|
<!-- <span slot="label" style="" @click="getBaseList(1013,1)"><a herf="#">物料分类</a></span>--> |
|
|
|
|
|
<!-- <el-input v-model="dataForm.partTypeDesc" style="width: 130px" readonly @focus="getBaseList(1013,1)" ></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item label=" ">--> |
|
|
|
|
|
<!-- <span slot="label" style="" @click="getBaseList(19,1)"><a herf="#">属性模板</a></span>--> |
|
|
|
|
|
<!-- <el-input v-model="dataForm.codeNo" style="width: 130px" readonly @focus="getBaseList(19,1)"></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
|
<el-form-item :label="'属性模板名称'"> |
|
|
|
|
|
<el-input v-model="dataForm.codeDesc" style="width: 130px" disabled></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole"> |
|
|
|
|
|
<el-form-item :label="'物料名称'" prop="partName" :rules="dataRole.partName"> |
|
|
|
|
|
<el-input v-model="dataForm.partName" style="width: 562px" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
|
|
<el-form-item :label="'物料描述'"> |
|
|
|
|
|
<el-input v-model="dataForm.partDesc" style="width: 562px" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
|
|
<el-form-item :label="'规格型号'"> |
|
|
|
|
|
<el-input v-model="dataForm.partSpec" style="width: 562px" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
|
|
<el-form-item :label="'物料图号'"> |
|
|
|
|
|
<el-input v-model="dataForm.materialNumber" style="width: 562px" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
|
|
<el-form-item :label="'备注'"> |
|
|
|
|
|
<el-input v-model="dataForm.remark" style="width: 562px" ></el-input> |
|
|
|
|
|
|
|
|
<!-- <el-form-item :label="'属性模板名称'">--> |
|
|
|
|
|
<!-- <el-input v-model="dataForm.codeDesc" style="width: 130px" disabled></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- </el-form>--> |
|
|
|
|
|
<!-- <el-form :inline="true" label-position="top" label-width="100px" >--> |
|
|
|
|
|
<!-- <el-form-item :label="'物料描述'" prop="partDesc" :rules="dataRole.partDesc">--> |
|
|
|
|
|
<!-- <el-input v-model="dataForm.partDesc" style="width: 562px" ></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- </el-form>--> |
|
|
|
|
|
<!-- <el-form :inline="true" label-position="top" label-width="100px">--> |
|
|
|
|
|
<!--<!– <el-form-item :label="'物料名称'" prop="partName" :rules="dataRole.partName">–>--> |
|
|
|
|
|
<!-- <el-form-item :label="'物料名称'" prop="partName">--> |
|
|
|
|
|
<!-- <el-input v-model="dataForm.partName" style="width: 562px" ></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- </el-form>--> |
|
|
|
|
|
<!-- <el-form :inline="true" label-position="top" label-width="100px" >--> |
|
|
|
|
|
<!-- <el-form-item :label="'规格型号'">--> |
|
|
|
|
|
<!-- <el-input v-model="dataForm.partSpec" style="width: 562px" ></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- </el-form>--> |
|
|
|
|
|
<!-- <el-form :inline="true" label-position="top" label-width="100px" >--> |
|
|
|
|
|
<!-- <el-form-item :label="'物料图号'">--> |
|
|
|
|
|
<!-- <el-input v-model="dataForm.materialNumber" style="width: 562px" ></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- </el-form>--> |
|
|
|
|
|
<!-- <el-form :inline="true" label-position="top" label-width="100px" >--> |
|
|
|
|
|
<!-- <el-form-item :label="'备注'">--> |
|
|
|
|
|
<!-- <el-input v-model="dataForm.remark" style="width: 562px" ></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- </el-form>--> |
|
|
|
|
|
<el-form label-position="top" ref="dataFrom" :model="dataForm" :rules="dataRole"> |
|
|
|
|
|
<el-row :gutter="15"> |
|
|
|
|
|
<el-col :span="4"> |
|
|
|
|
|
<el-form-item label="项目料号" prop="testPartNo"> |
|
|
|
|
|
<el-input v-model="dataForm.testPartNo" disabled clearable></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item label="物料描述" prop="partDesc" :rules="dataRole.partDesc"> |
|
|
|
|
|
<el-input v-model="dataForm.partDesc" clearable></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="属性模板"> |
|
|
|
|
|
<span slot="label" style="" @click="getBaseList(20)"><a herf="#">属性模板</a></span> |
|
|
|
|
|
<el-row :gutter="3"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-input v-model="dataForm.codeNo" readonly @focus="getBaseList(20)"></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="16"> |
|
|
|
|
|
<el-input v-model="dataForm.codeDesc" disabled></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item label="物料名称"> |
|
|
|
|
|
<el-input v-model="dataForm.partName"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item label="物料图号"> |
|
|
|
|
|
<el-input v-model="dataForm.materialNumber"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item label="规格型号"> |
|
|
|
|
|
<el-input v-model="dataForm.partSpec" clearable></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item prop="partType" label="物料分类"> |
|
|
|
|
|
<span slot="label" @click="getBaseList(108)"><a herf="#">物料分类</a></span> |
|
|
|
|
|
<el-row :gutter="3"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-input v-model="dataForm.partType" readonly @focus="getBaseList(108)"></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="16"> |
|
|
|
|
|
<el-input v-model="dataForm.partTypeDesc" disabled></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item prop="groupId"> |
|
|
|
|
|
<span slot="label" @click="getBaseList(109)"><a herf="#">物料分组</a></span> |
|
|
|
|
|
<el-row :gutter="3"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-input v-model="dataForm.groupId" readonly @focus="getBaseList(109)"></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="16"> |
|
|
|
|
|
<el-input v-model="dataForm.groupName" disabled></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<span slot="label" @click="getBaseList(110)"><a herf="#">商品组1</a></span> |
|
|
|
|
|
<el-row :gutter="3"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-input v-model="dataForm.productGroupId1" readonly @focus="getBaseList(110)"></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="16"> |
|
|
|
|
|
<el-input v-model="dataForm.productGroupName1" disabled></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<span slot="label" @click="getBaseList(111)"><a herf="#">商品组2</a></span> |
|
|
|
|
|
<el-row :gutter="3"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-input v-model="dataForm.productGroupId2" readonly @focus="getBaseList(111)"></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="16"> |
|
|
|
|
|
<el-input v-model="dataForm.productGroupName2" disabled></el-input> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-form-item label="备注" style="height: 90px"> |
|
|
|
|
|
<el-input type="textarea" resize="none" style="min-width: 90px" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.remark"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
@ -204,8 +303,10 @@ |
|
|
refreshItemModal, |
|
|
refreshItemModal, |
|
|
} from "@/api/base/properties.js" |
|
|
} from "@/api/base/properties.js" |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
|
|
import DictDataSelect from "../../sys/dict-data-select.vue"; |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
|
|
|
DictDataSelect, |
|
|
Chooselist |
|
|
Chooselist |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
@ -289,6 +390,23 @@ |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 80 |
|
|
columnWidth: 80 |
|
|
},{ |
|
|
},{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 101002001, |
|
|
|
|
|
serialNumber: '101002001Table4PartDesc', |
|
|
|
|
|
tableId: "101002001Table4", |
|
|
|
|
|
tableName: "项目物料", |
|
|
|
|
|
columnProp: "partDesc", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: "物料描述", |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 120 |
|
|
|
|
|
},{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 101002001, |
|
|
functionId: 101002001, |
|
|
serialNumber: '101002001Table4PartName', |
|
|
serialNumber: '101002001Table4PartName', |
|
|
@ -305,23 +423,6 @@ |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 120 |
|
|
columnWidth: 120 |
|
|
},{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 101002001, |
|
|
|
|
|
serialNumber: '101002001Table4PartDesc', |
|
|
|
|
|
tableId: "101002001Table4", |
|
|
|
|
|
tableName: "项目物料", |
|
|
|
|
|
columnProp: "partDesc", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: "物料描述", |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 120 |
|
|
|
|
|
},{ |
|
|
},{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 101002001, |
|
|
functionId: 101002001, |
|
|
@ -492,9 +593,22 @@ |
|
|
username:'', |
|
|
username:'', |
|
|
codeNo:'', |
|
|
codeNo:'', |
|
|
codeDesc:'', |
|
|
codeDesc:'', |
|
|
|
|
|
groupId:undefined, |
|
|
|
|
|
groupName:undefined, |
|
|
|
|
|
productGroupId1:undefined, |
|
|
|
|
|
productGroupName1:undefined, |
|
|
|
|
|
productGroupId2:undefined, |
|
|
|
|
|
productGroupName2:undefined, |
|
|
}, |
|
|
}, |
|
|
dataRole: { |
|
|
dataRole: { |
|
|
partTypeDesc: [ |
|
|
|
|
|
|
|
|
partType: [ |
|
|
|
|
|
{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'change' |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
groupId: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
@ -507,6 +621,12 @@ |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
trigger: 'change' |
|
|
} |
|
|
} |
|
|
|
|
|
],partDesc: [ |
|
|
|
|
|
{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'change' |
|
|
|
|
|
} |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
// 导出 start |
|
|
// 导出 start |
|
|
@ -644,11 +764,20 @@ |
|
|
if(type==1) { |
|
|
if(type==1) { |
|
|
strVal = this.dataForm.partType |
|
|
strVal = this.dataForm.partType |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (val === 19) { |
|
|
|
|
|
|
|
|
}else if (val === 19) { |
|
|
if(type==1) { |
|
|
if(type==1) { |
|
|
strVal = this.dataForm.codeNo |
|
|
strVal = this.dataForm.codeNo |
|
|
} |
|
|
} |
|
|
|
|
|
}else if (val === 108) { |
|
|
|
|
|
strVal = this.dataForm.partType |
|
|
|
|
|
} else if (val === 109) { |
|
|
|
|
|
strVal = this.dataForm.groupId |
|
|
|
|
|
} else if (val === 110) { |
|
|
|
|
|
strVal = this.dataForm.productGroupId1 |
|
|
|
|
|
} else if (val === 111) { |
|
|
|
|
|
strVal = this.dataForm.productGroupId2 |
|
|
|
|
|
}else if (val === 20) { |
|
|
|
|
|
strVal = this.dataForm.codeNo |
|
|
} |
|
|
} |
|
|
this.$refs.baseList.init(val, strVal) |
|
|
this.$refs.baseList.init(val, strVal) |
|
|
}) |
|
|
}) |
|
|
@ -660,12 +789,26 @@ |
|
|
this.dataForm.partType = val.Base_id |
|
|
this.dataForm.partType = val.Base_id |
|
|
this.dataForm.partTypeDesc = val.Base_desc |
|
|
this.dataForm.partTypeDesc = val.Base_desc |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.tagNo === 19) { |
|
|
|
|
|
|
|
|
}else if (this.tagNo === 19) { |
|
|
if(this.tagNo1==1) { |
|
|
if(this.tagNo1==1) { |
|
|
this.dataForm.codeNo = val.Code_no |
|
|
this.dataForm.codeNo = val.Code_no |
|
|
this.dataForm.codeDesc = val.Code_desc |
|
|
this.dataForm.codeDesc = val.Code_desc |
|
|
} |
|
|
} |
|
|
|
|
|
} else if (this.tagNo === 108) { |
|
|
|
|
|
this.dataForm.partType = val.family_id |
|
|
|
|
|
this.dataForm.partTypeDesc = val.family_name |
|
|
|
|
|
} else if (this.tagNo === 109) { |
|
|
|
|
|
this.dataForm.groupId = val.group_id |
|
|
|
|
|
this.dataForm.groupName = val.group_name |
|
|
|
|
|
} else if (this.tagNo === 110) { |
|
|
|
|
|
this.dataForm.productGroupId1 = val.product_group_id |
|
|
|
|
|
this.dataForm.productGroupName1 = val.product_group_name |
|
|
|
|
|
} else if (this.tagNo === 111) { |
|
|
|
|
|
this.dataForm.productGroupId2 = val.product_group_id |
|
|
|
|
|
this.dataForm.productGroupName2 = val.product_group_name |
|
|
|
|
|
} else if (this.tagNo === 20) { |
|
|
|
|
|
this.dataForm.codeNo = val.Code_no |
|
|
|
|
|
this.dataForm.codeDesc = val.Code_desc |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//初始化组件的参数 |
|
|
//初始化组件的参数 |
|
|
@ -693,63 +836,49 @@ |
|
|
}) |
|
|
}) |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
this.dataForm={ |
|
|
|
|
|
id:0, |
|
|
|
|
|
site: this.searchData.site, |
|
|
|
|
|
projectId: this.searchData.projectId, |
|
|
|
|
|
testPartNo:'', |
|
|
|
|
|
partType:'', |
|
|
|
|
|
partTypeDesc:'', |
|
|
|
|
|
partName:'', |
|
|
|
|
|
partDesc:'', |
|
|
|
|
|
partSpec:'', |
|
|
|
|
|
remark:'', |
|
|
|
|
|
materialNumber:'', |
|
|
|
|
|
username:this.$store.state.user.name, |
|
|
|
|
|
codeNo:'', |
|
|
|
|
|
codeDesc:'', |
|
|
|
|
|
} |
|
|
|
|
|
this.visible=true; |
|
|
this.visible=true; |
|
|
}, |
|
|
}, |
|
|
updateModel(row){ |
|
|
updateModel(row){ |
|
|
this.dataForm={ |
|
|
|
|
|
id:row.id, |
|
|
|
|
|
site: row.site, |
|
|
|
|
|
projectId: row.projectId, |
|
|
|
|
|
testPartNo:row.testPartNo, |
|
|
|
|
|
partType:row.partType, |
|
|
|
|
|
partTypeDesc:row.partTypeDesc, |
|
|
|
|
|
partName:row.partName, |
|
|
|
|
|
partDesc:row.partDesc, |
|
|
|
|
|
partSpec:row.partSpec, |
|
|
|
|
|
remark:row.remark, |
|
|
|
|
|
materialNumber:row.materialNumber, |
|
|
|
|
|
codeNo:row.codeNo, |
|
|
|
|
|
codeDesc:row.codeDesc, |
|
|
|
|
|
username:this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.dataForm = {...row} |
|
|
this.visible=true; |
|
|
this.visible=true; |
|
|
}, |
|
|
}, |
|
|
saveData(){ |
|
|
saveData(){ |
|
|
if(this.dataForm.partType==''||this.dataForm.partType==null){ |
|
|
|
|
|
this.$alert('请选择物料类别!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.dataForm.partName==''||this.dataForm.partName==null){ |
|
|
|
|
|
this.$alert('请输入物料名称!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
saveProjectPart(this.dataForm).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success( '操作成功') |
|
|
|
|
|
this.visible = false |
|
|
|
|
|
this.searchTable(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg) |
|
|
|
|
|
|
|
|
this.$refs.dataFrom.validate((vaildate)=>{ |
|
|
|
|
|
if (vaildate){ |
|
|
|
|
|
saveProjectPart(this.dataForm).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success( '操作成功') |
|
|
|
|
|
this.visible = false |
|
|
|
|
|
this.searchTable(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}else { |
|
|
|
|
|
// if(this.dataForm.partName==''||this.dataForm.partName==null){ |
|
|
|
|
|
// this.$alert('请输入物料名称!', '错误', { |
|
|
|
|
|
// confirmButtonText: '确定' |
|
|
|
|
|
// }) |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } |
|
|
|
|
|
if (!this.dataForm.partType){ |
|
|
|
|
|
this.$alert('请选择物料分类!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.dataForm.groupId){ |
|
|
|
|
|
this.$alert('请选择物料分组!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(!this.dataForm.partDesc){ |
|
|
|
|
|
this.$alert('请输入物料描述!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
@ -905,6 +1034,31 @@ |
|
|
|
|
|
|
|
|
return s |
|
|
return s |
|
|
}, |
|
|
}, |
|
|
|
|
|
closeDataFromDialog(){ |
|
|
|
|
|
this.dataForm={ |
|
|
|
|
|
id:0, |
|
|
|
|
|
site: this.searchData.site, |
|
|
|
|
|
projectId: this.searchData.projectId, |
|
|
|
|
|
testPartNo:'', |
|
|
|
|
|
partType:'', |
|
|
|
|
|
partTypeDesc:'', |
|
|
|
|
|
partName:'', |
|
|
|
|
|
partDesc:'', |
|
|
|
|
|
partSpec:'', |
|
|
|
|
|
remark:'', |
|
|
|
|
|
materialNumber:'', |
|
|
|
|
|
username:this.$store.state.user.name, |
|
|
|
|
|
codeNo:'', |
|
|
|
|
|
codeDesc:'', |
|
|
|
|
|
groupId:undefined, |
|
|
|
|
|
groupName:undefined, |
|
|
|
|
|
productGroupId1:undefined, |
|
|
|
|
|
productGroupName1:undefined, |
|
|
|
|
|
productGroupId2:undefined, |
|
|
|
|
|
productGroupName2:undefined, |
|
|
|
|
|
} |
|
|
|
|
|
this.$refs.dataFrom.resetFields(); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|