| | |
| | | v-model="form.name" |
| | | placeholder="请选择" |
| | | class="select-width" |
| | | @change="getGroupNumber" |
| | | > |
| | | <el-option |
| | | v-for="item in nameList" |
| | |
| | | <el-form-item label="组别" prop="workshopGroup" class="form-item"> |
| | | <el-select |
| | | v-model="form.workshopGroup" |
| | | placeholder="请选择" |
| | | placeholder="请先选择车间" |
| | | no-data-text="请先选择车间" |
| | | class="select-width" |
| | | > |
| | | <el-option |
| | | v-for="item in workshopGroupList" |
| | | :key="item.ID" |
| | | :label="item.name" |
| | | :value="item.ID" |
| | | :key="item" |
| | | :label="item" |
| | | :value="item" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="finenessGradeye" label="野纤" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="finenessGradebig" label="大野" show-overflow-tooltip> |
| | | <el-table-column |
| | | prop="finenessGradebig" |
| | | label="大野" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="finenessGradeSpecial" label="特野" width="120"> |
| | | <el-table-column |
| | | prop="finenessGradeSpecial" |
| | | label="特野" |
| | | width="120" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="finenessGrade" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // getWorkshopManageList, |
| | | import { |
| | | saveRegister, |
| | | getDictList, |
| | | getWorkshopManageList, |
| | | getRegisterDetails, |
| | | } from "@/api/productManage/silkRegisterForm.js"; |
| | | import { |
| | |
| | | } from "@/api/productManage/silkInspectForm.js"; |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin"; |
| | | import CommonFormTableView from "@/components/makepager/CommonFormTableView"; |
| | | import { getWorkshopManageGroup } from "@/api/productManage/productRegisterForm.js"; |
| | | export default { |
| | | name: "silkRegisterAddPage", |
| | | props: {}, |
| | |
| | | JSON.stringify(response.data ? response.data : {}) |
| | | ); |
| | | this.form = config; |
| | | this.getGroupNumber() |
| | | this.tableList.tableData = config.finenessList |
| | | ? config.finenessList |
| | | : []; |
| | | this.tableData=this.tableList.tableData |
| | | this.tableData = this.tableList.tableData; |
| | | } |
| | | } |
| | | ); |
| | |
| | | this.form.finishDate = config.finenessRegister.finishDate; |
| | | this.form.circle = config.finenessRegister.circle; |
| | | this.getTableHeader(); |
| | | let arr= response.data.items |
| | | ? response.data.items |
| | | : []; |
| | | for(let i in arr){ |
| | | let round=arr[i].finenessRoundingItems |
| | | if(arr[i].finenessGrade){ |
| | | if(arr[i].finenessGrade.indexOf('野纤')>-1){ |
| | | arr[i].finenessGradeye=arr[i].finenessGrade |
| | | }else if(arr[i].finenessGrade.indexOf('大野')>-1){ |
| | | arr[i].finenessGradebig=arr[i].finenessGrade |
| | | }else if(arr[i].finenessGrade.indexOf('特野')>-1){ |
| | | arr[i].finenessGradeSpecial=arr[i].finenessGrade |
| | | } |
| | | } |
| | | if(round){ |
| | | for(let j in round){ |
| | | arr[i][round[j].fineness]=round[j].quantity |
| | | } |
| | | } |
| | | let arr = response.data.items ? response.data.items : []; |
| | | for (let i in arr) { |
| | | let round = arr[i].finenessRoundingItems; |
| | | if (arr[i].finenessGrade) { |
| | | if (arr[i].finenessGrade.indexOf("野纤") > -1) { |
| | | arr[i].finenessGradeye = arr[i].finenessGrade; |
| | | } else if (arr[i].finenessGrade.indexOf("大野") > -1) { |
| | | arr[i].finenessGradebig = arr[i].finenessGrade; |
| | | } else if (arr[i].finenessGrade.indexOf("特野") > -1) { |
| | | arr[i].finenessGradeSpecial = arr[i].finenessGrade; |
| | | } |
| | | } |
| | | this.tableTwoList.tableInfomation =arr; |
| | | if (round) { |
| | | for (let j in round) { |
| | | arr[i][round[j].fineness] = round[j].quantity; |
| | | } |
| | | } |
| | | } |
| | | this.tableTwoList.tableInfomation = arr; |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | }); |
| | | //组别 |
| | | getWorkshopManageList().then((res) => { |
| | | if (res.code == 200) { |
| | | this.workshopGroupList = res.data || []; |
| | | } |
| | | }); |
| | | // getWorkshopManageList().then((res) => { |
| | | // if (res.code == 200) { |
| | | // this.workshopGroupList = res.data || []; |
| | | // } |
| | | // }); |
| | | //庄口 |
| | | getDictList({ |
| | | dictType: 0, |
| | |
| | | this.marketList = res.data || []; |
| | | } |
| | | }); |
| | | }, |
| | | getGroupNumber() { |
| | | if (this.form.name) { |
| | | //组别 |
| | | let number = ""; |
| | | for (let i in this.nameList) { |
| | | if (this.nameList[i].name == this.form.name) { |
| | | number = this.nameList[i].number; |
| | | break; |
| | | } |
| | | } |
| | | getWorkshopManageGroup({ number: number }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.workshopGroupList = []; |
| | | let workshopGroupList = res.data || {}; |
| | | if (Object.keys(workshopGroupList).length > 0) { |
| | | for (let i in workshopGroupList) { |
| | | this.workshopGroupList.push(workshopGroupList[i]); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | this.workshopGroupList = []; |
| | | } |
| | | }, |
| | | inputStart() { |
| | | this.form.circleTwo = this.form.circle + "-" + this.form.totalCircle; |
| | |
| | | sum: "", |
| | | }, |
| | | ]; |
| | | }else{ |
| | | this.form.measureFineness='' |
| | | this.form.twiceChange='' |
| | | this.form.cleanliness='' |
| | | this.form.purity='' |
| | | this.form.marketProcessOrderNumber='' |
| | | this.form.inspector='' |
| | | } else { |
| | | this.form.measureFineness = ""; |
| | | this.form.twiceChange = ""; |
| | | this.form.cleanliness = ""; |
| | | this.form.purity = ""; |
| | | this.form.marketProcessOrderNumber = ""; |
| | | this.form.inspector = ""; |
| | | } |
| | | }, |
| | | // 保存 |
| | |
| | | message: "保存成功!", |
| | | type: "success", |
| | | }); |
| | | this.getDetailsData() |
| | | this.getDetailsData(); |
| | | } |
| | | this.isAddloading = false; |
| | | }) |