| | |
| | | <u-form-item label="零件描述" :border-bottom="false" prop="partName"> |
| | | <u-input v-model="form.partName" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="批量大小" :border-bottom="false" prop="qtyrequired"> |
| | | <u-input v-model="form.qtyrequired" placeholder="" disabled /> |
| | | <u-form-item label="批量大小" :border-bottom="false" prop="qtyRequired"> |
| | | <u-input v-model="form.qtyRequired" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item |
| | | label="剩余数量" |
| | |
| | | <u-radio name="part">替代零件</u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="物料" prop="materialcost"> |
| | | <u-radio-group v-model="form.materialcost" :disabled="true"> |
| | | <u-form-item label="物料" prop="materialCost"> |
| | | <u-radio-group v-model="form.materialCost" :disabled="true"> |
| | | <u-radio name="倒冲">倒冲</u-radio> |
| | | <u-radio name="投料">投料</u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="工序" prop="value1"> |
| | | <u-form-item label="简化物料检查" prop="simplifyMaterials"> |
| | | <u-radio-group v-model="form.simplifyMaterials" :disabled="subdisabled || simplifyDisabled" @change="radioChange"> |
| | | <u-radio name="true">是</u-radio> |
| | | <u-radio name="false">否</u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <!-- <u-form-item label="工序"> |
| | | <u-checkbox-group> |
| | | <u-checkbox |
| | | :name="item.name" |
| | | v-for="(item, index) in checkboxList" |
| | | :key="index" |
| | | v-model="item.value1" |
| | | v-model="item.value" |
| | | @change="changeCheckbox" |
| | | :disabled="subdisabled || item.disabled" |
| | | > |
| | | {{ item.name }} |
| | | </u-checkbox> |
| | | </u-checkbox-group> |
| | | </u-form-item> |
| | | </u-form-item> --> |
| | | <u-form-item label="产出列表" :border-bottom="false"></u-form-item> |
| | | </u-form> |
| | | <view class="wrap"> |
| | |
| | | v-for="(item, index) in InventoryReceiptList" |
| | | :key="index" |
| | | :index="index" |
| | | @click="cancelReport(item)" |
| | | > |
| | | <view class="content-header"> |
| | | <view class="content-header-title">{{ index + 1 }}</view> |
| | |
| | | <view class="_label-name">批号:</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.productNo }} |
| | | {{ item.outBatchNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | |
| | | :operationTaskList="this.form" |
| | | @update="handleUpdate" |
| | | /> |
| | | <u-modal |
| | | width="720rpx" |
| | | v-model="showModal" |
| | | title="" |
| | | :show-cancel-button="true" |
| | | :show-confirm-button="true" |
| | | @confirm="confirmModle" |
| | | @cancel="cancelModle" |
| | | > |
| | | <view class="popup-content"> |
| | | <view class="packing-registration-param"> |
| | | <view class="packing-registration-param-view"> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">批号</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one">{{ detailedList.outBatchNo }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">零件号</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one">{{ detailedList.partNo }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">零件描述</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <span class="item-one">{{ detailedList.partName }}</span> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">取消接收数量</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <span class="item-one">{{ detailedList.netWeight }}</span> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-modal> |
| | | <scan></scan> |
| | | </div> |
| | | </template> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | checkboxList: [ |
| | | { |
| | | name: "工序的自动报告", |
| | | value: false, |
| | | disabled: false, |
| | | }, |
| | | { |
| | | name: "简化物料检查", |
| | | value: false, |
| | | disabled: false, |
| | | }, |
| | | ], |
| | | simplifyDisabled:false, |
| | | // checkboxList: [ |
| | | // { |
| | | // name: "工序的自动报告", |
| | | // value: false, |
| | | // disabled: false, |
| | | // }, |
| | | // { |
| | | // name: "简化物料检查", |
| | | // value: false, |
| | | // disabled: false, |
| | | // }, |
| | | // ], |
| | | InventoryReceiptList: [], |
| | | form: { |
| | | workstationId: "", |
| | |
| | | moOn: "", |
| | | partNo: "", |
| | | partName: "", |
| | | qtyrequired: "", |
| | | qtyRequired: "", |
| | | Jianqtyfinished: "", |
| | | proposedLocation: "", |
| | | productType: "dep", |
| | | receive: "mo", |
| | | materialcost: "", |
| | | autoReport: false, |
| | | simplifyMaterials: false, |
| | | materialCost: "", |
| | | // autoReport: false, |
| | | simplifyMaterials: 'false', |
| | | }, |
| | | rules: { |
| | | work: [ |
| | |
| | | showSave: false, |
| | | operationTaskId: "", |
| | | subdisabled: false, |
| | | codeInfoId: "", |
| | | detailedList: {}, |
| | | showModal: false, |
| | | }; |
| | | }, |
| | | // 点击提交按钮的事件处理函数 |
| | |
| | | id: this.form.id, |
| | | }) |
| | | .then((res) => { |
| | | res.data.name = this.form.name; |
| | | this.$refs.saveForm.open(res); |
| | | uni.hideLoading(); |
| | | }); |
| | |
| | | if (data.code) { |
| | | let codeInfo = JSON.parse(data.code); |
| | | if (codeInfo.moOn) { |
| | | that.codeInfoId = codeInfo.id; |
| | | // 扫描报工单二维码 |
| | | that.saveForm(codeInfo); |
| | | that.$u.api.workReporting |
| | | .getProductMainV1({ |
| | | current: 1, |
| | | size: -1, |
| | | id: codeInfo.id, |
| | | }) |
| | | .then((res) => { |
| | | that.InventoryReceiptList = res.data.productOutputList; |
| | | }); |
| | | that.getHandelList(); |
| | | } |
| | | if (codeInfo.BN) { |
| | | // 扫描报工单二维码 |
| | | that.CopperReportingWork(codeInfo); |
| | | } |
| | | } |
| | | }); |
| | |
| | | watch: { |
| | | "form.taskNo": function (newVal, oldVal) { |
| | | this.subdisabled = false; |
| | | this.checkboxList[1].value = false; |
| | | this.checkboxList[0].value = false; |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 多选处理 |
| | | changeCheckbox(val) { |
| | | if (val.name === "工序的自动报告") { |
| | | this.form.autoReport = val.value; |
| | | } |
| | | if (val.name === "简化物料检查") { |
| | | this.form.simplifyMaterials = val.value; |
| | | } |
| | | // 铜杆报工 |
| | | CopperReportingWork(val) { |
| | | const copperList = {}; |
| | | copperList.outBatchNo = val.BN |
| | | copperList.partNo = val.PN |
| | | copperList.weighingClerk = val.WC |
| | | copperList.executiveStandard = val.ES |
| | | copperList.netWeight = val.NW |
| | | copperList.specificationType = val.ST |
| | | copperList.grossWeight = val.TR |
| | | copperList.operationTaskId = this.form.id |
| | | this.form.productOutputList = []; |
| | | this.form.operationTaskId = this.form.id; |
| | | this.form.productOutputList.push(copperList); |
| | | console.log('this.form',this.form) |
| | | this.$u.api.workReporting.submitPDA(this.form).then((res) => { |
| | | this.subdisabled = true; |
| | | this.getHandelList(); |
| | | this.$u.toast("报工成功"); |
| | | }); |
| | | }, |
| | | // 点击确认后获取取消报工记录 |
| | | confirmModle() { |
| | | console.log("点击确认后获取取消报工记录"); |
| | | // 处理确认逻辑 |
| | | this.$u.api.cancelReporting |
| | | .cancelDTAOfWorkApplication({ |
| | | outBatchNo: this.detailedList.outBatchNo, |
| | | }) |
| | | .then((res) => { |
| | | console.log("res", res); |
| | | this.showModal = false; |
| | | this.getHandelList(); |
| | | this.$u.toast("取消报工成功"); |
| | | }); |
| | | }, |
| | | cancelModle() { |
| | | this.showModal = false; // 关闭弹窗 |
| | | }, |
| | | // 取消报工 |
| | | cancelReport(item) { |
| | | let that = this; |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "是否确认取消批次" + item.outBatchNo + "的报工", |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | that.detailedList = item; |
| | | that.showModal = true; |
| | | } else if (res.cancel) { |
| | | return; |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | getHandelList() { |
| | | this.$u.api.workReporting |
| | | .getProductMainV1({ |
| | | current: 1, |
| | | size: -1, |
| | | id: this.codeInfoId, |
| | | }) |
| | | .then((res) => { |
| | | this.InventoryReceiptList = res.data.productOutputList; |
| | | }); |
| | | }, |
| | | // 多选处理 |
| | | // changeCheckbox(val) { |
| | | // if (val.name === "工序的自动报告") { |
| | | // this.form.autoReport = val.value; |
| | | // } |
| | | // if (val.name === "简化物料检查") { |
| | | // this.form.simplifyMaterials = val.value; |
| | | // } |
| | | // }, |
| | | handleUpdate() { |
| | | this.subdisabled = true; |
| | | this.getHandelList(); |
| | | }, |
| | | // 打开弹框--后面还需要监听扫码枪扫码结果,赋值给报工单号字段,然后打开弹框选择订单号等操作 |
| | | open() { |
| | |
| | | moOn: val.moOn, |
| | | partNo: val.partNo, |
| | | partName: val.partName, |
| | | qtyrequired: val.qtyrequired, |
| | | Jianqtyfinished: val.qtyrequired - val.qtyfinished, |
| | | qtyRequired: val.qtyRequired, |
| | | Jianqtyfinished: val.qtyRequired - val.qtyFinished, |
| | | proposedLocation: val.proposedLocation, |
| | | productType: "dep", |
| | | receive: "mo", // 复选框组的值 |
| | | materialcost: val.materialcost, |
| | | autoReport: false, |
| | | simplifyMaterials: false, |
| | | receive: "mo", |
| | | materialCost: val.materialCost, |
| | | // autoReport: false, |
| | | simplifyMaterials: 'false', |
| | | }; |
| | | if (this.form.materialcost == "倒冲") { |
| | | this.checkboxList[1].disabled = true; |
| | | this.checkboxList[1].value = false; |
| | | this.checkboxList[0].value = false; |
| | | if (this.form.materialCost == "倒冲") { |
| | | this.simplifyDisabled = true; |
| | | } |
| | | }, |
| | | }, |