fix:修复纤度登记表,检验表,产量等级表部分的bug修复
| | |
| | | message: res.data.msg, |
| | | type: "error", |
| | | duration: 5 * 1000 |
| | | }) |
| | | }); |
| | | return Promise.reject(res.data) |
| | | } |
| | | }, |
| | |
| | | class="demo-ruleForm" |
| | | > |
| | | <el-row> |
| | | <el-col :span="3"> |
| | | <el-col :span="4"> |
| | | <el-form-item label="编号" prop="number"> |
| | | <el-input v-model="ruleForm.number" size="small"></el-input> |
| | | </el-form-item> |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="生产日期" prop="createTime"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd" |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="庄口" prop="marketId"> |
| | | <el-select |
| | | v-model="ruleForm.marketId" |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="车间" prop="workshopNumber"> |
| | | <el-select |
| | | v-model="ruleForm.workshopNumber" |
| | |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="组别" prop="groupNumber"> |
| | | <el-select |
| | | v-model="ruleForm.groupNumber" |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-col :span="4"> |
| | | <el-form-item label="规格" prop="spec"> |
| | | <el-select |
| | | v-model="ruleForm.spec" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="乙班时间" prop="timeYi"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | v-model="ruleForm.timeYi" |
| | | size="small" |
| | | style="width: 100%" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | v-model="ruleForm.timeYi" |
| | | size="small" |
| | | style="width: 100%" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-form-item label="是否结庄" prop="jieZhuang"> |
| | | <el-input |
| | | v-model="ruleForm.jieZhuang" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-col :span="5"> |
| | | <el-form-item label="甲班时间" prop="timeJia"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="是否结庄" prop="jieZhuang"> |
| | | <el-select v-model="ruleForm.jieZhuang" size="small"> |
| | | <el-option label="是" value="是"></el-option> |
| | | <el-option label="否" valu="否"></el-option> |
| | | </el-select> |
| | | <!--<el-input |
| | | v-model="ruleForm.jieZhuang" |
| | | size="small" |
| | | ></el-input>--> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-form-item label="等级" prop="level"> |
| | | <el-input |
| | |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-form-item label="车组缫折" prop="groupReelingdiscount"> |
| | | <el-input |
| | | v-model="ruleForm.groupReelingdiscount" |
| | | size="small" |
| | | v-model="ruleForm.groupReelingdiscount" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{scope.row.peopleYield!=0?scope.row.peopleYield.toFixed(2):''}} |
| | | {{scope.row.peopleYield!=0?scope.row.peopleYield:''}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{(ruleForm.record&&ruleForm.record!=0&&scope.row.oneYield)?(scope.row.oneYield/ruleForm.record).toFixed(2):''}} |
| | | {{(ruleForm.record&&ruleForm.record!=0&&scope.row.oneYield)?((scope.row.oneYield/ruleForm.record)||0):''}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | width="60" |
| | | align="center"> |
| | | <template slot-scope="scope"> |
| | | {{(ruleForm.record&&ruleForm.record!=0&&scope.row.allYield1)?(scope.row.allYield1/ruleForm.record).toFixed(2):''}} |
| | | {{(ruleForm.record&&ruleForm.record!=0&&scope.row.allYield1)?((scope.row.allYield1/ruleForm.record)):''}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{(ruleForm.record&&ruleForm.record!=0&&scope.row.allYield2)?(scope.row.allYield2/ruleForm.record).toFixed(2):''}} |
| | | {{(ruleForm.record&&ruleForm.record!=0&&scope.row.allYield2)?((scope.row.allYield2/ruleForm.record)):''}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{(ruleForm.record&&ruleForm.record!=0&&scope.row.allYield3)?(scope.row.allYield3/ruleForm.record).toFixed(2):''}} |
| | | {{(ruleForm.record&&ruleForm.record!=0&&scope.row.allYield3)?((scope.row.allYield3/ruleForm.record)):''}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | @changeForm='changeForm' |
| | | @changeTableInput='changeTableInput' /> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | } from "@/api/productManage/productRegisterForm.js"; |
| | | import { |
| | | getDictList, |
| | | getAutoCode |
| | | } from "@/api/productManage/silkRegisterForm.js"; |
| | | |
| | | export default { |
| | | name: "addProductRegisterPage", |
| | | props: {}, |
| | |
| | | ruleForm: { |
| | | number: "", |
| | | record: "", |
| | | createTime: "", |
| | | createTime: new Date(), |
| | | circle: "", |
| | | marketId: "", |
| | | fallingSilkCocoonNumber: "", |
| | |
| | | this.getDetailsData() |
| | | }, |
| | | methods: { |
| | | async getAutoCode(){ |
| | | const {code,data}=await getAutoCode({type:3}); |
| | | if(code===200){ |
| | | return data.id; |
| | | } |
| | | return "" |
| | | }, |
| | | async getDetailsData(){ |
| | | const code =await this.getAutoCode(); |
| | | this.ruleForm = { |
| | | number: "", |
| | | number: code, |
| | | record: "", |
| | | createTime: "", |
| | | createTime: new Date(), |
| | | circle: "", |
| | | marketId: "", |
| | | fallingSilkCocoonNumber: "", |
| | |
| | | } |
| | | this.getPeopleYield(row) |
| | | row.oneYield=Number(string); |
| | | return string.toFixed(2); |
| | | return parseFloat(string||0).toFixed(2); |
| | | }, |
| | | getPeopleYield(row){ |
| | | let string=0 |
| | |
| | | } |
| | | } |
| | | row['allYield'+val]=Number(string); |
| | | return string.toFixed(2); |
| | | return parseFloat(string||'0').toFixed(2); |
| | | }, |
| | | changeForm(form,val,data){ |
| | | if(val){ |
| | |
| | | if(Number(form.pieceNumber)>0&&Number(form.pieces)<5){ |
| | | this.tableData.map((item) => { |
| | | item.isBlue=false |
| | | }) |
| | | }); |
| | | this.$set(this.tableData[i],'isBlue',true) |
| | | this.$set(this.tableData[i],'pieceNumber'+form.pieceNumber+form.pieces,form.netWeight) |
| | | this.tableShow=false; |
| | |
| | | getWorkshopManageGroup({number:this.ruleForm.workshopNumber}).then((res) => { |
| | | if (res.code == 200) { |
| | | let workshopGroupList = res.data || {}; |
| | | this.workshopGroupList=[] |
| | | this.workshopGroupList=[]; |
| | | if(Object.keys(workshopGroupList).length>0){ |
| | | for(let i in workshopGroupList){ |
| | | this.workshopGroupList.push(workshopGroupList[i]) |
| | |
| | | if(val){ |
| | | setTimeout(()=>{ |
| | | this.$set(this.ruleForm,'groupNumber',this.ruleForm.groupNumber) |
| | | },200) |
| | | },200); |
| | | } |
| | | } |
| | | }else{ |
| | | this.workshopGroupList=[] |
| | | this.workshopGroupList=[]; |
| | | this.ruleForm.groupNumber='' |
| | | } |
| | | }); |
| | |
| | | let marketName='' |
| | | for(let i in this.marketList){ |
| | | if( this.marketList[i].ID==this.ruleForm.marketId){ |
| | | marketName= this.marketList[i].name |
| | | marketName= this.marketList[i].name; |
| | | break; |
| | | } |
| | | } |
| | |
| | | this.tableData.push({carNumber:data[i][j],perList:data[i],isBlue:false}) |
| | | } |
| | | } |
| | | this.tableData[0].isBlue=true |
| | | //this.tableData[0].isBlue=true |
| | | } |
| | | this.ruleForm.carNumber=this.tableData.length>0?this.tableData[0].carNumber:'' |
| | | |
| | | console.log(this.tableData); |
| | | // 编辑 |
| | | if(val){ |
| | | this.getTableEdit() |
| | |
| | | this.ruleForm.level='' |
| | | this.ruleForm.carNumber='' |
| | | } |
| | | },(error)=>{ |
| | | this.ruleForm.groupNumber='' |
| | | this.tableData=[]; |
| | | }); |
| | | } |
| | | }else{ |
| | |
| | | this.$router.go(-1); |
| | | }, |
| | | // 放弃 |
| | | cancelClickOne() { |
| | | async cancelClickOne() { |
| | | const code =await this.getAutoCode(); |
| | | this.ruleForm = { |
| | | number: "", |
| | | number: code, |
| | | record: "", |
| | | createTime: "", |
| | | createTime: new Date(), |
| | | circle: "", |
| | | marketId: "", |
| | | fallingSilkCocoonNumber: "", |
| | |
| | | <span slot="label"> |
| | | <span class="formLabel">净重</span> |
| | | </span> |
| | | <el-input v-model="proForm.netWeight" @blur="changeTableInput" size="small"></el-input> |
| | | <el-input v-model="proForm.netWeight" @blur="changeTableInput" @keypress.enter.native="changeTableInput" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | |
| | | this.workshopGroupList=[] |
| | | let workshopGroupList = res.data || {}; |
| | | this.workshopGroupList=[] |
| | | this.ruleForm.groupNumber='' |
| | | //this.ruleForm.groupNumber='' |
| | | if(Object.keys(workshopGroupList).length>0){ |
| | | for(let i in workshopGroupList){ |
| | | this.workshopGroupList.push(workshopGroupList[i]) |
| | |
| | | type="primary" |
| | | :loading="isAddloading" |
| | | @click="saveClickOne('form')" |
| | | :disabled="title==='查看'" |
| | | >保存</el-button |
| | | > |
| | | </template> |
| | |
| | | label-width="80px" |
| | | > |
| | | <el-form-item label="编号" prop="number" class="form-item"> |
| | | <el-input v-model="form.number" :disabled="title=='修改'?true:false" placeholder="请输入"> </el-input> |
| | | <el-input v-model="form.number" :disabled="title=='修改'||title=='查看'?true:false" placeholder="请输入"> </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="落丝时间" prop="finishDate" class="form-item"> |
| | | <el-date-picker |
| | |
| | | type="date" |
| | | placeholder="选择日期" |
| | | class="select-width" |
| | | :disabled='title==="查看"' |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | placeholder="请选择" |
| | | class="select-width" |
| | | @change="getGroupNumber" |
| | | :disabled='title==="查看"' |
| | | > |
| | | <el-option |
| | | v-for="item in marketList" |
| | |
| | | v-model="form.workshopObj" |
| | | placeholder="请选择" |
| | | class="select-width" |
| | | :disabled='title==="查看"' |
| | | @change="getGroupNumber('workshopObj')"> |
| | | <el-option |
| | | v-for="item in nameList" |
| | |
| | | v-model="form.spec" |
| | | placeholder="请选择" |
| | | class="select-width" |
| | | :disabled='title==="查看"' |
| | | > |
| | | <el-option |
| | | v-for="item in specList" |
| | |
| | | placeholder="请先选择车间" |
| | | no-data-text="请先选择车间" |
| | | class="select-width" |
| | | :disabled='title==="查看"' |
| | | @change="getGroupNumber()" |
| | | > |
| | | <el-option |
| | |
| | | placeholder="请输入" |
| | | show-word-limit |
| | | class="select-width" |
| | | :disabled='title==="查看"' |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | @input="inputStart" |
| | | placeholder="请输入" |
| | | show-word-limit |
| | | :disabled='title==="查看"' |
| | | class="select-width" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | type="primary" |
| | | :loading="isAddloading" |
| | | @click="saveClickOne('form')" |
| | | >保存</el-button |
| | | > |
| | | :disabled="title==='查看'" |
| | | >保存</el-button> |
| | | <!-- </template> |
| | | </CommonSearch> --> |
| | | </div> |
| | |
| | | show-overflow-tooltip |
| | | :sortable="item.sortable" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{scope.row[item.prop]}} |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | show-overflow-tooltip |
| | | :sortable="item.sortable" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{scope.row[item.prop]}} |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | width="100" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{scope.row[item.prop]}} |
| | | </template> |
| | | <template v-for="(item, i) in tableTwoList.upper"> |
| | | <el-table-column |
| | | align="center" |
| | |
| | | show-overflow-tooltip |
| | | :sortable="item.sortable" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{scope.row[item.prop]}} |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | label: "纤度值", |
| | | prop: "fineness", |
| | | inputNumber: true, |
| | | isRequird: true |
| | | isRequird: true, |
| | | noOperate:this.$route.query.title==='查看' |
| | | }, // 销售负责人 |
| | | { |
| | | label: "数量", |
| | |
| | | } |
| | | if (round) { |
| | | for (let j in round) { |
| | | arr[i][round[j].fineness] = round[j].quantity; |
| | | arr[i][round[j].fineness.toString()] = round[j].quantity; |
| | | } |
| | | } |
| | | } |
| | | this.tableTwoList.tableInfomation = arr; |
| | | this.tableTwoList.tableInfomation = arr; |
| | | } |
| | | }); |
| | | } |
| | |
| | | let item = { |
| | | label: lowNumber + i * 0.5 + "", |
| | | prop: lowNumber + i * 0.5 + "", |
| | | min: 100, |
| | | min: 50, |
| | | default: true, |
| | | }; |
| | | this.tableTwoList.objective.push(item); |
| | |
| | | let item = { |
| | | label: lowStart + i * 0.5 + "", |
| | | prop: lowStart + i * 0.5 + "", |
| | | min: 100, |
| | | min: 50, |
| | | default: true, |
| | | }; |
| | | this.tableTwoList.lower.push(item); |
| | |
| | | let item = { |
| | | label: topNumber + i * 0.5 + "", |
| | | prop: topNumber + i * 0.5 + "", |
| | | min: 100, |
| | | min: 50, |
| | | default: true, |
| | | }; |
| | | this.tableTwoList.upper.push(item); |
| | |
| | | activeName: this.activeName, |
| | | inspectID: this.inspectID, |
| | | id: this.registerId, |
| | | title:this.title |
| | | }, |
| | | }); |
| | | this.getDetailsData(); |
| | |
| | | } |
| | | for (let i in finenessList) { |
| | | delete finenessList[i].productId; |
| | | finenessList[i].sum=finenessList[i].sum*1; |
| | | } |
| | | this.isAddloading = true; |
| | | const mapFineness=new Map(); |
| | |
| | | mapFineness.set(item.position,[item]); |
| | | } |
| | | }); |
| | | console.log("修改",mapFineness) |
| | | finenessList=[...mapFineness.values()].flat(Infinity); |
| | | let params = { |
| | | finenessList: finenessList, |
| | | ...form, |
| | | finenessList: finenessList, |
| | | }; |
| | | // 编辑 |
| | | if (this.inspectID) { |
| | |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90" fixed="right"> |
| | | <el-table-column label="操作" width="120" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">修改</el-button> |
| | | <el-button @click="handleClick(scope.row,1)" type="text" size="small">查看</el-button> |
| | | <el-button @click="handleClick(scope.row,2)" type="text" size="small">修改</el-button> |
| | | <el-button @click="delClick(scope.row.ID)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | { label: "落丝时间", prop: "finishDate", min: 190, }, // 客户名称 |
| | | { label: "车组", prop: "workshopGroup", min: 100, }, // 联系人姓名 |
| | | { label: "规格", prop: "spec", min: 100 }, // 客户状态 |
| | | { label: "车间", prop: "name", min: 100 }, // 联系方式 |
| | | { label: "车间", prop: "workshopName", min: 100 }, // 联系方式 |
| | | { label: "庄口", prop: "market", min: 130 }, // 联系人日期 |
| | | { label: "开始回数", prop: "circle", min: 130 }, // 下次回访日期 |
| | | { label: "结束回数", prop: "totalCircle", min: 110 }, // 负责人 |
| | |
| | | |
| | | }, |
| | | // 编辑 |
| | | handleClick(row) { |
| | | handleClick(row,type) { |
| | | this.$router.push({ |
| | | path:"/productManage/silkRegisterForm/addPage", |
| | | query:{ |
| | | id:row.ID, |
| | | activeName:'first', |
| | | inspectID:row.finenessCheckID, |
| | | title:'修改' |
| | | title:type===1?'查看':'修改' |
| | | } |
| | | }); |
| | | }, |
| | |
| | | //解决表格抖动问题 |
| | | beforeUpdate() { |
| | | this.$nextTick(() => { |
| | | this.$refs["fromTable"].doLayout() |
| | | if(this.$refs["fromTable"]){ |
| | | this.$refs["fromTable"].doLayout() |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | |
| | | //解决表格抖动问题 |
| | | beforeUpdate() { |
| | | this.$nextTick(() => { |
| | | this.$refs["fromTable"].doLayout() |
| | | if(this.$refs["fromTable"]){ |
| | | this.$refs["fromTable"].doLayout() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | //解决表格抖动问题 |
| | | beforeUpdate() { |
| | | this.$nextTick(() => { |
| | | this.$refs["fromTable"].doLayout() |
| | | if(this.$refs["fromTable"]){ |
| | | this.$refs["fromTable"].doLayout() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | //解决表格抖动问题 |
| | | beforeUpdate() { |
| | | this.$nextTick(() => { |
| | | this.$refs["fromTable"].doLayout() |
| | | if(this.$refs["fromTable"]){ |
| | | this.$refs["fromTable"].doLayout() |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | |
| | | function resolve(dir) { |
| | | return path.join(__dirname, dir) |
| | | } |
| | | const ipNum=59; |
| | | const serverPath='http://192.168.0.86:8008'; |
| | | const ipNum=105; |
| | | const serverPath='http://192.168.0.105:8008'; |
| | | // 设置不参与构建的库 |
| | | const externals = {}; |
| | | module.exports = { |