| | |
| | | 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-row> |
| | | </el-form-item> |
| | | <el-form-item label="车号" prop="position" class="form-item"> |
| | | <el-input v-model="form.position" placeholder="请输入"> |
| | | <el-input v-model.number="form.position" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | <!-- <CommonSearch :show-add="false" :show-download="false" :amount-view="false" :show-action-btn="false" |
| | | placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> --> |
| | | <el-button size="small" type="primary" @click="cancelClickTwo" |
| | | <el-button size="small" type="primary" @click="cancelClickOne" |
| | | >放弃</el-button |
| | | > |
| | | <el-button |
| | |
| | | >保存</el-button |
| | | > |
| | | <!-- </template> |
| | | </CommonSearch> --> |
| | | </CommonSearch> --> |
| | | </div> |
| | | </div> |
| | | <div class="body-two body"> |
| | |
| | | {{ form.finishDate }} |
| | | </el-form-item> |
| | | </div> |
| | | <div class="list-view"> |
| | | <div class="list-view-two"> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :data="tableTwoList.tableInfomation" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | :height="'calc(100% - 0px)'" |
| | | > |
| | | <el-table-column label="车号" prop="ID" width="100"> |
| | | </el-table-column> |
| | |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="野纤" width="120"> |
| | | <el-table-column prop="finenessGradeye" label="野纤" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="大野" show-overflow-tooltip> |
| | | <el-table-column |
| | | prop="finenessGradebig" |
| | | label="大野" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" 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: {}, |
| | |
| | | ], |
| | | // 组别 应该true |
| | | workshopGroup: [ |
| | | { required: false, message: "请选择", trigger: ["change", "blur"] }, |
| | | { required: true, message: "请选择", trigger: ["change", "blur"] }, |
| | | ], |
| | | circleTwo: [ |
| | | { required: true, message: "请填写", trigger: ["change", "blur"] }, |
| | |
| | | JSON.stringify(response.data ? response.data : {}) |
| | | ); |
| | | this.form = config; |
| | | this.tableList.tableData = config.finenessList |
| | | this.getGroupNumber() |
| | | let finenessList=config.finenessList |
| | | ? config.finenessList |
| | | : []; |
| | | if(finenessList.length>0){ |
| | | finenessList.map((item,index)=>{ |
| | | item.productId=index+1 |
| | | }) |
| | | } |
| | | console.log(finenessList,'===finenessList') |
| | | this.tableList.tableData = finenessList |
| | | 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(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 = ""; |
| | | } |
| | | }, |
| | | // 纤度检验表 |
| | | cancelClickTwo() {}, |
| | | // 保存 |
| | | saveClickOne(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | |
| | | // params.workshopGroup=Number(params.workshopGroup) |
| | | this.isAddloading = true; |
| | | if (this.activeName == "first") { |
| | | delete form.circle; |
| | | delete form.circleTwo; |
| | | let finenessList = JSON.parse( |
| | | JSON.stringify(this.tableList.tableData) |
| | | ); |
| | |
| | | message: "保存成功!", |
| | | type: "success", |
| | | }); |
| | | this.getDetailsData(); |
| | | } |
| | | this.isAddloading = false; |
| | | }) |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // 放弃 |
| | | cancelClick() {}, |
| | | saveClick() {}, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | height: 45px; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-table .el-table__cell { |
| | | padding: 6px 0 !important; |
| | | height: 35px; |
| | | text-align: center; |
| | | } |
| | | .custom-manage { |
| | | height: 100%; |
| | | overflow: hidden; |
| | |
| | | .body-l { |
| | | background-color: #fff; |
| | | border-radius: 12px; |
| | | height: calc(100% - 180px - 20px); |
| | | height: calc(100% - 20px); |
| | | width: calc(100% - 420px); |
| | | float: left; |
| | | overflow: hidden; |
| | |
| | | } |
| | | |
| | | .list-view { |
| | | height: calc(100% - 0px); |
| | | height: calc(100% - 180px); |
| | | min-height: 200px; |
| | | overflow: hidden; |
| | | overflow-y: auto; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | .list-view { |
| | | max-height: calc(100% - 90px - 10px); |
| | | .list-view-two { |
| | | height: calc(100% - 120px); |
| | | overflow: hidden; |
| | | } |
| | | |