| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车间" prop="name" class="form-item"> |
| | | <el-form-item label="车间" prop="workshopObj" class="form-item"> |
| | | <el-select |
| | | v-model="form.name" |
| | | v-model="form.workshopObj" |
| | | placeholder="请选择" |
| | | class="select-width" |
| | | @change="getGroupNumber('name')" |
| | | @change="getGroupNumber('workshopObj')" |
| | | > |
| | | <el-option |
| | | v-for="item in nameList" |
| | | :key="item.ID" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | :value="{ value: item.number, label: item.name }" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | |
| | | :detail-enter="isView ? true : false" |
| | | :selectBox="false" |
| | | :detailEnter="true" |
| | | :isBorder="true" |
| | | :show-summary="showSummary" |
| | | :product-table-list="tableList" |
| | | @inputContent="inputContent" |
| | |
| | | :model="form" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="60px" |
| | | label-width="70px" |
| | | > |
| | | <div class="form-box-t"> |
| | | <el-form-item label="编号" prop="number" class="form-item"> |
| | | <el-form-item label="编号:" prop="number" class="form-item"> |
| | | {{ form.number }} |
| | | </el-form-item> |
| | | <el-form-item label="车间" prop="name" class="form-item"> |
| | | {{ form.name }} |
| | | <el-form-item label="车间:" prop="workshopName" class="form-item"> |
| | | {{ form.workshopName }} |
| | | </el-form-item> |
| | | <el-form-item label="组别" prop="workshopGroup" class="form-item"> |
| | | <el-form-item label="组别:" prop="workshopGroup" class="form-item"> |
| | | {{ form.workshopGroup }} |
| | | </el-form-item> |
| | | <el-form-item label="回数" prop="circle" class="form-item"> |
| | | <el-form-item label="回数:" prop="circle" class="form-item"> |
| | | {{ form.circle }} |
| | | </el-form-item> |
| | | <el-form-item label="规格" prop="spec" class="form-item"> |
| | | <el-form-item label="规格:" prop="spec" class="form-item"> |
| | | {{ form.spec }} |
| | | </el-form-item> |
| | | <el-form-item label="日期" prop="finishDate" class="form-item"> |
| | | <el-form-item label="日期:" prop="finishDate" class="form-item"> |
| | | {{ form.finishDate }} |
| | | </el-form-item> |
| | | </div> |
| | |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | :height="'calc(100% - 0px)'" |
| | | :header-cell-style="{ background: '#f1f3f8',color: '#000009', 'font-size': '12px', 'font-family': 'PingFangSC' }" |
| | | border |
| | | > |
| | | <el-table-column label="车号" prop="ID" width="100"> |
| | | </el-table-column> |
| | |
| | | { required: true, message: "请选择", trigger: ["change", "blur"] }, |
| | | ], |
| | | // 车间 应该true |
| | | name: [ |
| | | workshopObj: [ |
| | | { required: true, message: "请选择", trigger: ["change", "blur"] }, |
| | | ], |
| | | spec: [ |
| | |
| | | number: "", |
| | | finishDate: "", |
| | | market: "", |
| | | name: "", |
| | | workshopObj: "", |
| | | spec: "", |
| | | workshopGroup: "", |
| | | circleTwo: "", |
| | |
| | | JSON.stringify(response.data ? response.data : {}) |
| | | ); |
| | | this.form = config; |
| | | this.form.workshopObj={ |
| | | value:config.workshopNumber, |
| | | label:config.workshopName, |
| | | } |
| | | this.getGroupNumber('','edit') |
| | | let finenessList=config.finenessList |
| | | ? config.finenessList |
| | |
| | | } else { |
| | | this.form = { |
| | | number: "", |
| | | name: "", |
| | | workshopObj: "", |
| | | workshopGroup: "", |
| | | circle: "", |
| | | spec: "", |
| | |
| | | ); |
| | | this.form = config; |
| | | this.form.number = config.finenessRegister.number; |
| | | this.form.name = config.finenessRegister.name; |
| | | this.form.workshopName = config.finenessRegister.workshopName; |
| | | this.form.workshopGroup = config.finenessRegister.workshopGroup; |
| | | this.form.spec = config.finenessRegister.spec; |
| | | this.form.finishDate = config.finenessRegister.finishDate; |
| | |
| | | }); |
| | | }, |
| | | async getGroupNumber(val,type) { |
| | | 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; |
| | | } |
| | | } |
| | | if(number){ |
| | | await getWorkshopManageGroup({ number: number }).then((res) => { |
| | | if (Object.keys(this.form.workshopObj).length>0) { |
| | | if(this.form.workshopObj.value){ |
| | | await getWorkshopManageGroup({ number: this.form.workshopObj.value }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.workshopGroupList = []; |
| | | let workshopGroupList = res.data || {}; |
| | | this.workshopGroupList=[] |
| | | if(val=='name'){ |
| | | if(val=='workshopObj'){ |
| | | this.form.workshopGroup='' |
| | | } |
| | | if (Object.keys(workshopGroupList).length > 0) { |
| | |
| | | } |
| | | if(this.form.workshopGroup&&this.form.market&&type!='edit'){ |
| | | await getCarNumber({ |
| | | workshopName:this.form.name, |
| | | workshopName:this.form.workshopObj.label, |
| | | marketName:this.form.market, |
| | | groupNumber:this.form.workshopGroup, |
| | | }).then((res) => { |
| | |
| | | let data = res.data?JSON.parse(JSON.stringify(res.data)) : []; |
| | | if(Object.keys(data).length>0){ |
| | | for(let i in data){ |
| | | this.tableData.push({position:data[i],productId:Number(i)+1}) |
| | | this.tableData.push({position:data[i],productId:Number(i)*2+1}) |
| | | this.tableData.push({position:data[i],productId:Number(i)*2+2}) |
| | | } |
| | | } |
| | | this.tableList.tableData = this.tableData |
| | | this.tableList.tableData = this.tableData |
| | | }else{ |
| | | this.tableData=[] |
| | | } |
| | |
| | | number: "", |
| | | finishDate: "", |
| | | market: "", |
| | | name: "", |
| | | workshopObj: "", |
| | | spec: "", |
| | | workshopGroup: "", |
| | | circleTwo: "", |
| | |
| | | if (this.inspectID) { |
| | | params.ID = this.form.ID ? this.form.ID : Number(this.inspectID); |
| | | } |
| | | |
| | | params.workshopName=this.form.workshopObj.label; |
| | | params.workshopNumber=this.form.workshopObj.value; |
| | | saveRegister(params) |
| | | .then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | }); |
| | | } else { |
| | | let paramsTwo = { |
| | | ...form, |
| | | // ...form, |
| | | info:form, |
| | | items:this.tableTwoList.tableInfomation, |
| | | }; |
| | | // 编辑 |
| | | if (this.registerId) { |