| | |
| | | placeholder="单位" |
| | | filterable |
| | | @change="Gtechange" |
| | | style="width: calc(85% - 0px)" |
| | | style="width: calc(85% - 120px)" |
| | | > |
| | | <!-- style="width: calc(85% - 110px)" --> |
| | | <el-option |
| | | v-for="ele in unitList" |
| | | :key="ele.id" |
| | |
| | | style="font-size: 20px; color: gray" |
| | | @click="handleUnitShow" |
| | | ></i> |
| | | <!-- <el-checkbox |
| | | <el-checkbox |
| | | class="margin_left_10px" |
| | | :disabled="editConfig.infomation.unit&&showFooter?false:true" |
| | | v-model="editConfig.infomation.moreUnit" |
| | | @change="moreUnitChange" |
| | | ></el-checkbox |
| | | > --> |
| | | >启用多单位</el-checkbox |
| | | > |
| | | <!-- <span class="margin_left_10px cursor_pointer" @click="handleUnitMore">启用多单位</span> --> |
| | | </el-form-item> |
| | | |
| | |
| | | placeholder="请选择" |
| | | size="mini" |
| | | clearable |
| | | filterable |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | > |
| | |
| | | <el-input |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | filterable |
| | | v-model="editConfig.infomation.type" |
| | | placeholder="请输入" |
| | | ></el-input> |
| | |
| | | v-model="editConfig.infomation.principal" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 85%" |
| | | style="width: 88%" |
| | | disabled |
| | | > |
| | | <el-option |
| | |
| | | ></el-input-number> |
| | | <span> kg</span> |
| | | </el-form-item> --> |
| | | <el-form-item label="毛重" prop="grossWeight"> |
| | | <el-form-item label="毛重" prop="grossWeight" label-width="80px"> |
| | | <el-col :span="15" |
| | | > |
| | | <el-input |
| | |
| | | ></el-input> |
| | | </el-col> |
| | | <el-col :span="1"> </el-col> |
| | | <el-col :span="4"> |
| | | <el-col :span="5"> |
| | | <el-select |
| | | v-model="editConfig.infomation.grossUnit" |
| | | placeholder="单位" |
| | |
| | | </el-select> |
| | | </el-col> |
| | | </el-form-item> |
| | | <el-form-item label="净重" prop="netWeight"> |
| | | <el-form-item label="净重" prop="netWeight" label-width="80px"> |
| | | <el-col :span="15" |
| | | > |
| | | <el-input |
| | |
| | | ></el-input> |
| | | </el-col> |
| | | <el-col :span="1"> </el-col> |
| | | <el-col :span="4"> |
| | | <el-col :span="5"> |
| | | <el-select |
| | | v-model="editConfig.infomation.netUnit" |
| | | placeholder="单位" |
| | |
| | | <UnitMoreDialog |
| | | ref="unitMoreDialog" |
| | | @saveUnitMore="saveUnitMore" |
| | | @cancelUnitMore='cancelUnitMore' |
| | | :workList="unitList" |
| | | :unitRight='editConfig.infomation.unit' |
| | | :dataList="editConfig.infomation.moreUnitList" |
| | | title="启用多单位" |
| | | ></UnitMoreDialog> |
| | |
| | | } |
| | | }, |
| | | saveUnitMore(list){ |
| | | this.editConfig.infomation.moreUnit=true |
| | | this.editConfig.infomation.moreUnitList=list |
| | | }, |
| | | cancelUnitMore(){ |
| | | this.editConfig.infomation.moreUnit=false |
| | | }, |
| | | // 启用多单位的开关 |
| | | moreUnitChange(){ |
| | | let string=false; |
| | | if(this.editConfig.infomation.moreUnitList&&this.editConfig.infomation.moreUnitList.length>0){ |
| | | for(let i in this.editConfig.infomation.moreUnitList){ |
| | | if(this.editConfig.infomation.moreUnitList[i].unit&&this.editConfig.infomation.moreUnitList[i].amount){ |
| | | string=true; |
| | | break; |
| | | } |
| | | // let string=false; |
| | | if(this.editConfig.infomation.unit){ |
| | | // if(this.editConfig.infomation.moreUnitList&&this.editConfig.infomation.moreUnitList.length>0){ |
| | | // for(let i in this.editConfig.infomation.moreUnitList){ |
| | | // if(this.editConfig.infomation.moreUnitList[i].unit&&this.editConfig.infomation.moreUnitList[i].amount){ |
| | | // string=true; |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | if(this.editConfig.infomation.moreUnit){ |
| | | // this.editConfig.infomation.moreUnit=false |
| | | // this.$message.error('请先配置多单位!') |
| | | this.$refs.unitMoreDialog.editDialogVisible = true; |
| | | } |
| | | } |
| | | if(!string){ |
| | | }else{ |
| | | this.editConfig.infomation.moreUnit=false |
| | | this.$message.error('请先配置多单位!') |
| | | this.$message.error('请先选择单位!') |
| | | } |
| | | |
| | | }, |
| | | handleConfirmSave(dataList) { |
| | | saveUnitDict({ data: dataList }).then((res) => { |
| | |
| | | params.codeStandardID = this.autoCodeObj.codeStandardID |
| | | params.autoIncr = this.autoCodeObj.maxAutoIncr |
| | | } |
| | | if(params.moreUnitList.length>0){ |
| | | if(params.moreUnitList&¶ms.moreUnitList.length>0){ |
| | | for(let i in params.moreUnitList){ |
| | | params.moreUnitList[i].amount=Number(params.moreUnitList[i].amount) |
| | | } |