PDA报工页面增加投料功能,扫描二维码取消获取产出记录列表,放开取消报工页面,编写取消报工逻辑,联调取消报工接口
| | |
| | | cancelReporting: { |
| | | // 取消报工确认 |
| | | cancelDTAOfWorkApplication: (params = {}) => vm.$u.get('/mes/product/cancelDTAOfWorkApplication', params), |
| | | selInputPartInfoPDA: (params = {}) => vm.$u.get('/mes/stock/selInputPartInfoPDA',params), |
| | | }, |
| | | // 车间订单下发 |
| | | WorkshopOrderIssued: { |
| | |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | // // 取消报工 |
| | | // { |
| | | // "path": "pages/product/cancelReport/index", |
| | | // "style": { |
| | | // "navigationStyle": "custom", |
| | | // "navigationBarTitleText": "", |
| | | // // "navigationBarBackgroundColor": "#3281FF" |
| | | // "enablePullDownRefresh": false |
| | | // } |
| | | // }, |
| | | // 取消报工 |
| | | { |
| | | "path": "pages/product/cancelReport/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#3281FF" |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | // 接收(铜杆) |
| | | { |
| | | "path": "pages/product/receive/index", |
| | |
| | | <!-- 取消报工 --> |
| | | <view class="page"> |
| | | <view class="packing-registration-bg" /> |
| | | <u-navbar |
| | | title="取消报工" |
| | | :background="background" |
| | | :border-bottom="false" |
| | | :title-bold="true" |
| | | title-color="#000" |
| | | back-icon-color="#000" |
| | | /> |
| | | <u-form |
| | | :model="form" |
| | | ref="uForm" |
| | | :label-width="280" |
| | | :rules="rules" |
| | | :error-type="['toast']" |
| | | class="uForm" |
| | | > |
| | | <u-navbar title="取消报工" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" |
| | | back-icon-color="#000" /> |
| | | <u-form :model="form" ref="uForm" :label-width="280" :rules="rules" :error-type="['toast']" class="uForm"> |
| | | <u-form-item label="订单号" :border-bottom="false" prop="moNo"> |
| | | <u-input |
| | | v-model="form.moNo" |
| | | type="select" |
| | | placeholder="点击选择" |
| | | @click="openList" |
| | | /> |
| | | <u-input v-model="form.moNo" type="select" placeholder="点击选择" @click="openList" /> |
| | | </u-form-item> |
| | | <u-form-item |
| | | label="取消报工记录:" |
| | | :border-bottom="false" |
| | | prop="value12" |
| | | ></u-form-item> |
| | | <u-form-item label="工单" :border-bottom="false" prop="optaskNo"> |
| | | <u-input v-model="form.optaskNo" type="select" placeholder="点击选择" @click="seachWork" /> |
| | | </u-form-item> |
| | | <u-form-item label="取消报工记录:" :border-bottom="false" prop="value12"></u-form-item> |
| | | </u-form> |
| | | <view class="wrap"> |
| | | <scroll-view class="finishProductIn-locno-scroll-list" scroll-y="true"> |
| | | <u-cell-group |
| | | class="finishProductIn-locno-scroll-list-group" |
| | | :border="false" |
| | | > |
| | | <view |
| | | class="content" |
| | | v-for="(item, index) in list" |
| | | :key="item.moNo" |
| | | :index="index" |
| | | > |
| | | <u-cell-group class="finishProductIn-locno-scroll-list-group" :border="false"> |
| | | <view class="content" v-for="(item, index) in list" :key="item.moNo" :index="index" |
| | | @click="cancelReport(item,index)"> |
| | | <view class="content-header"> |
| | | <view class="content-header-title">{{ index + 1 }}</view> |
| | | </view> |
| | |
| | | <view class="_label-name">批号:</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.moNo }} |
| | | {{ item.outBatchNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | </view> |
| | | <u-modal |
| | | width="720rpx" |
| | | v-model="showModal" |
| | | title="" |
| | | :show-cancel-button="true" |
| | | :show-confirm-button="true" |
| | | @confirm="confirm" |
| | | @cancel="cancel" |
| | | > |
| | | <u-modal width="720rpx" v-model="showModal" title="" :show-cancel-button="true" :show-confirm-button="true" |
| | | @confirm="confirmModle" @cancel="cancel"> |
| | | <view class="popup-content"> |
| | | <view class="packing-registration-param"> |
| | | <view class="packing-registration-param-view"> |
| | |
| | | <text class="item-one">批号</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one">{{ detailedList.moNo }}</text> |
| | | <text class="item-one">{{ detailedList.outBatchNo }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | }, |
| | | form: { |
| | | moNo: "", |
| | | optaskNo: "", |
| | | id: "", |
| | | }, |
| | | detailedList: {}, |
| | | list: [], |
| | | rules: {}, |
| | | showModal: false, |
| | | id: "", |
| | | }; |
| | | }, |
| | | onReady() {}, |
| | | onShow() { |
| | | let that = this; |
| | | uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器 |
| | | uni.$on("scan", function (data) { |
| | | console.log("onscan"); |
| | | //扫码成功后的回调,你可以写自己的逻辑代码在这里 |
| | | console.log("页面扫码结果:", data.code); |
| | | if (data.code) { |
| | | let codeInfo = JSON.parse(data.code); |
| | | console.log('222') |
| | | if (codeInfo.moNo) { |
| | | console.log('1111') |
| | | // 扫描报工单二维码 |
| | | that.saveForm(codeInfo); |
| | | // that.$forceUpdate(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // onShow() { |
| | | // let that = this; |
| | | // uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器 |
| | | // uni.$on("scan", function (data) { |
| | | // console.log("onscan"); |
| | | // //扫码成功后的回调,你可以写自己的逻辑代码在这里 |
| | | // console.log("页面扫码结果:", data.code); |
| | | // if (data.code) { |
| | | // let codeInfo = JSON.parse(data.code); |
| | | // console.log('222') |
| | | // if (codeInfo.moNo) { |
| | | // console.log('1111') |
| | | // // 扫描报工单二维码 |
| | | // that.saveForm(codeInfo); |
| | | // // that.$forceUpdate(); |
| | | // } |
| | | // } |
| | | // }); |
| | | // }, |
| | | methods: { |
| | | // 点击确认后获取取消报工记录 |
| | | confirm() { |
| | | // 处理确认逻辑 |
| | | this.$u.api.cancelReporting.cancelDTAOfWorkApplication({outBatchNo:this.detailedList.outBatchNo}).then((res) => { |
| | | console.log("res", res); |
| | | this.list = res.data.records; |
| | | this.showModal = false; |
| | | //工单 |
| | | seachWork() { |
| | | if (this.form.moNo == "") { |
| | | this.$u.toast("请选择订单号"); |
| | | return; |
| | | } |
| | | // 使用uni.navigateTo方法跳转,并通过queryParams传递参数 |
| | | uni.navigateTo({ |
| | | url: "/pages/product/WorkshopOrderIssued/WorkOrderList?id=" + |
| | | encodeURIComponent(JSON.stringify(this.form.id)), |
| | | }); |
| | | }, |
| | | cancel() { |
| | |
| | | }, |
| | | setNo(val) { |
| | | this.form.moNo = val.moNo; |
| | | this.form.id = val.id; |
| | | }, |
| | | // 回显扫码的信息-报工单 |
| | | saveForm(val) { |
| | |
| | | } |
| | | this.detailedList = val; |
| | | this.showModal = true; |
| | | }, |
| | | // 工单回显 |
| | | workNo(val) { |
| | | this.id = val.id; |
| | | this.getBGList(); |
| | | this.form.optaskNo = val.optaskNo; |
| | | }, |
| | | getBGList() { |
| | | this.$u.api.workReporting |
| | | .getProductMainV1({ |
| | | current: 1, |
| | | size: -1, |
| | | id:this.id, |
| | | }) |
| | | .then((res) => { |
| | | console.log('res',res) |
| | | this.list = res.data.productOutputList; |
| | | }); |
| | | }, |
| | | // 取消报工 |
| | | cancelReport(item, index) { |
| | | 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; |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | confirmModle() { |
| | | console.log("点击确认后获取取消报工记录"); |
| | | // 处理确认逻辑 |
| | | this.$u.api.cancelReporting |
| | | .cancelDTAOfWorkApplication({ |
| | | outBatchNo: this.detailedList.outBatchNo, |
| | | outputId: this.detailedList.id |
| | | }) |
| | | .then((res) => { |
| | | console.log("res", res); |
| | | this.getBGList(); |
| | | this.showModal = false; |
| | | // this.getHandelList(); |
| | | this.$u.toast("取消报工成功"); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .popup-content { |
| | | width: 720rpx; |
| | | height: 400rpx; |
| | |
| | | z-index: 10; |
| | | /* 确保内容在蒙版之上 */ |
| | | } |
| | | |
| | | .page { |
| | | box-sizing: border-box; |
| | | } |
| | |
| | | .u-form-item { |
| | | padding: 0; |
| | | } |
| | | |
| | | .wrap .finishProductIn-locno-scroll-list { |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx); |
| | | width: 100%; |
| | |
| | | <template> |
| | | <view> |
| | | <u-modal |
| | | v-model="show" |
| | | ref="uModal" |
| | |
| | | :loading="loading" |
| | | > |
| | | <view class="packing-registration-param"> |
| | | <scroll-view scroll-y="true" style="height: 100%;transform: translateZ(0);-webkit-font-smoothing: antialiased;"> |
| | | <scroll-view |
| | | scroll-y="true" |
| | | style=" |
| | | height: 100%; |
| | | transform: translateZ(0); |
| | | -webkit-font-smoothing: antialiased; |
| | | " |
| | | > |
| | | <view class="packing-registration-param-view"> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | |
| | | </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"> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.ifsBatchNoArr" |
| | | disabled |
| | | /> |
| | | </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"> |
| | | <u-input class="item-one item-two" v-model="form.overallLength" /> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.overallLength" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | <text class="item-one">工序</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input class="item-one item-two" v-model="form.name" disabled /> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.name" |
| | | disabled |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | <text class="item-one">成品外径测量值</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input class="item-one item-two" v-model="form.outerDiameter" /> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.outerDiameter" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | </scroll-view> |
| | | </view> |
| | | </u-modal> |
| | | <u-modal |
| | | v-model="showModal" |
| | | title="" |
| | | :show-cancel-button="true" |
| | | :show-confirm-button="true" |
| | | @confirm="confirmTl" |
| | | @cancel="cancelTl" |
| | | > |
| | | <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 item-two">{{ |
| | | detailedList.ifsBatchNo |
| | | }}</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 item-two">{{ detailedList.partName }}</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"> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="detailedList.suppliedQuantity" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | default: () => ({}), |
| | | }, |
| | | dutyId: { |
| | | type: String, |
| | | type: Number, |
| | | required: true, |
| | | default: '', |
| | | default: "", |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | showModal: false, |
| | | detailedList: {}, |
| | | show: false, |
| | | form: {}, |
| | | ifsBatchNo: [], |
| | | productInputList: [], |
| | | loading: false, |
| | | }; |
| | | }, |
| | |
| | | this.$refs.uModal.clearLoading(); // 清除加载状态 |
| | | return; |
| | | } |
| | | if (this.form.productInputList.length == 0) { |
| | | this.$u.toast("投料批次不能为空,请扫码投料"); |
| | | this.$refs.uModal.clearLoading(); // 清除加载状态 |
| | | return; |
| | | } |
| | | this.operationTaskList.operationTaskId = this.operationTaskList.id; |
| | | this.form.operationTaskId = this.operationTaskList.id; |
| | | this.form.status = this.operationTaskList.status; |
| | |
| | | this.$u.api.workReporting |
| | | .submitPDA(this.operationTaskList) |
| | | .then((res) => { |
| | | this.$emit("update"); |
| | | this.$emit("update",this.operationTaskList); |
| | | this.$refs.uModal.cancel(); |
| | | }) |
| | | .finally(() => { |
| | |
| | | cancel() { |
| | | this.show = false; |
| | | this.form = {}; |
| | | this.ifsBatchNo = []; |
| | | this.productInputList = []; |
| | | }, |
| | | cancelTl() { |
| | | this.showModal = false; |
| | | this.detailedList = {}; |
| | | }, |
| | | updateArray(arr, newObj) { |
| | | // 查找数组中是否有相同的 id |
| | | let index = arr.findIndex(item => item.ifsBatchNo === newObj.ifsBatchNo); |
| | | |
| | | if (index !== -1) { |
| | | // 如果找到相同 id 的对象,替换原有对象 |
| | | arr[index] = newObj; |
| | | } else { |
| | | // 如果没有找到相同 id 的对象,直接推入新对象 |
| | | arr.push(newObj); |
| | | } |
| | | return arr; |
| | | }, |
| | | confirmTl() { |
| | | let ifsBatchNoArr = []; |
| | | let updatedArrayList = this.updateArray(this.productInputList, this.detailedList); |
| | | console.log("updatedArrayList", updatedArrayList); |
| | | // this.productInputList.push(updatedArrayList); |
| | | this.$set(this.form, "productInputList", this.productInputList); |
| | | |
| | | this.productInputList.forEach((item) => { |
| | | ifsBatchNoArr.push(item.ifsBatchNo) |
| | | }) |
| | | console.log("ifsBatchNoArr", ifsBatchNoArr); |
| | | // this.ifsBatchNo.push(ifsBatchNoArr); |
| | | this.$set(this.form, "ifsBatchNoArr", ifsBatchNoArr); |
| | | console.log("this.form", this.form); |
| | | this.showModal = false; |
| | | this.detailedList = {}; |
| | | }, |
| | | open(val) { |
| | | this.show = true; |
| | | this.form = val.data; |
| | | }, |
| | | // 回显扫码的信息-报工单 |
| | | saveForm(val) { |
| | | this.$u.api.cancelReporting |
| | | .selInputPartInfoPDA({ |
| | | outBatchNo: val.BN, |
| | | partNo: val.PN, |
| | | moOn: this.operationTaskList.moOn, |
| | | }) |
| | | .then((res) => { |
| | | const list = { |
| | | suppliedQuantity: res.data.suppliedQuantity, |
| | | ifsBatchNo: res.data.ifsBatchNo, |
| | | partNo: res.data.partNo, |
| | | partName: res.data.partName, |
| | | locationNo: res.data.locationNo, |
| | | ifsLineItemNo: res.data.ifsLineItemNo, |
| | | serialNo: res.data.serialNo, |
| | | engChgLevel: res.data.engChgLevel, |
| | | ifsWdr: res.data.waivDevRejNo, |
| | | activitySeq: res.data.activitySeq, |
| | | }; |
| | | this.detailedList = list; |
| | | this.showModal = true; |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <!-- 报工 --> |
| | | <div class="page"> |
| | | <u-form |
| | | :model="form" |
| | | ref="uForm" |
| | | :label-width="200" |
| | | :rules="rules" |
| | | :error-type="['toast']" |
| | | > |
| | | <u-form :model="form" ref="uForm" :label-width="200" :rules="rules" :error-type="['toast']"> |
| | | <u-form-item label="车间" :border-bottom="false" prop="work" style="font-size:small"> |
| | | <u-radio-group v-model="form.work" :disabled="subdisabled"> |
| | | <u-radio name="dt"><span style="font-size:small">导体</span></u-radio> |
| | |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="报工单号" :border-bottom="false" prop="taskNo" style="font-size:small"> |
| | | <u-input |
| | | v-model="form.taskNo" |
| | | type="select" |
| | | placeholder="请扫描报工单号" |
| | | @click="open" |
| | | /> |
| | | <u-input v-model="form.taskNo" type="select" placeholder="请扫描报工单号" @click="open" /> |
| | | </u-form-item> |
| | | <u-form-item label="工序" :border-bottom="false" prop="name" style="font-size:small"> |
| | | <u-input |
| | | v-model="form.name" |
| | | type="select" |
| | | placeholder="请扫描报工单号" |
| | | /> |
| | | <u-input v-model="form.name" type="select" placeholder="请扫描报工单号" /> |
| | | </u-form-item> |
| | | <u-form-item label="订单号" :border-bottom="false" prop="moOn" style="font-size:small"> |
| | | <u-input |
| | | v-model="form.moOn" |
| | | type="select" |
| | | placeholder="点击选择" |
| | | @click="openList" |
| | | /> |
| | | <u-input v-model="form.moOn" type="select" placeholder="点击选择" @click="openList" /> |
| | | </u-form-item> |
| | | <u-form-item label="零件号" :border-bottom="false" prop="partNo" style="font-size:small"> |
| | | <u-input v-model="form.partNo" placeholder="" disabled /> |
| | |
| | | <u-form-item label="批量大小" :border-bottom="false" prop="qtyRequired" style="font-size:small"> |
| | | <u-input v-model="form.qtyRequired" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item |
| | | label="剩余数量" |
| | | :border-bottom="false" |
| | | prop="Jianqtyfinished" |
| | | style="font-size:small" |
| | | > |
| | | <u-form-item label="剩余数量" :border-bottom="false" prop="Jianqtyfinished" style="font-size:small"> |
| | | <u-input v-model="form.Jianqtyfinished" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="库位" :border-bottom="false" prop="proposedLocation" style="font-size:small"> |
| | |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="简化物料检查" label-width="90px" prop="simplifyMaterials" style="font-size:small"> |
| | | <u-radio-group v-model="form.simplifyMaterials" :disabled="subdisabled || simplifyDisabled" @change="radioChange"> |
| | | <u-radio-group v-model="form.simplifyMaterials" :disabled="subdisabled || simplifyDisabled" |
| | | @change="radioChange"> |
| | | <u-radio name="true"><span style="font-size:small">是</span></u-radio> |
| | | <u-radio name="false"><span style="font-size:small">否</span></u-radio> |
| | | </u-radio-group> |
| | |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="人员名称" label-width="90px" :border-bottom="false" prop="Persons" style="font-size:small"> |
| | | <u-input v-model="form.Persons" type="select" placeholder="请选择" |
| | | @click="openselectedPersons" :disabled="!canSelectPerson || subdisabled"/> |
| | | <u-input v-model="form.Persons" type="select" placeholder="请选择" @click="openselectedPersons" |
| | | :disabled="!canSelectPerson || subdisabled" /> |
| | | </u-form-item> |
| | | <u-form-item label="产出列表" :border-bottom="false" style="font-size:small"></u-form-item> |
| | | </u-form> |
| | | <view class="wrap"> |
| | | <scroll-view class="packing-registration-scroll-list" scroll-y="true"> |
| | | <u-cell-group |
| | | class="packing-registration-scroll-list-group" |
| | | :border="false" |
| | | > |
| | | <view |
| | | class="content" |
| | | v-for="(item, index) in InventoryReceiptList" |
| | | :key="index" |
| | | :index="index" |
| | | @click="cancelReport(item)" |
| | | > |
| | | <u-cell-group class="packing-registration-scroll-list-group" :border="false"> |
| | | <view class="content" v-for="(item, index) in InventoryReceiptList" :key="index" :index="index" |
| | | @click="cancelReport(item,index)"> |
| | | <view class="content-header"> |
| | | <view class="content-header-title" style="font-size:small">{{ index + 1 }}</view> |
| | | </view> |
| | |
| | | </view> |
| | | <!-- 填写报工单 --> |
| | | <modalBg ref="modalBg" :confirm="confirm"> |
| | | <u-field |
| | | v-model="form.taskNo" |
| | | label="报工单号" |
| | | placeholder="请输入" |
| | | :border-bottom="false" |
| | | style="font-size:small" |
| | | > |
| | | <u-field v-model="form.taskNo" label="报工单号" placeholder="请输入" :border-bottom="false" |
| | | style="font-size:small"> |
| | | </u-field> |
| | | </modalBg> |
| | | <saveForm |
| | | ref="saveForm" |
| | | :operationTaskList="this.form" |
| | | :dutyId="dutyId" |
| | | @update="handleUpdate" |
| | | /> |
| | | <u-modal |
| | | width="720rpx" |
| | | v-model="showModal" |
| | | title="" |
| | | :show-cancel-button="true" |
| | | :show-confirm-button="true" |
| | | @confirm="confirmModle" |
| | | @cancel="cancelModle" |
| | | > |
| | | <saveForm ref="saveForm" :operationTaskList="this.form" :dutyId="dutyId" @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"> |
| | |
| | | <u-modal v-model="personShowModal" title="" :show-cancel-button="true" :show-confirm-button="true" |
| | | @confirm="confirmSelection" @cancel="cancelSelection"> |
| | | <view class="popup-content"> |
| | | <scroll-view scroll-y="true" style="height: 100%; transform: translateZ(0); -webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;"> |
| | | <scroll-view scroll-y="true" |
| | | style="height: 100%; transform: translateZ(0); -webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;"> |
| | | <view class="popup-header"> |
| | | <checkbox-group @change="checkboxChange"> |
| | | <label class="checkbox-item" v-for="(item, index) in selectedPersons" :key="index"> |
| | |
| | | personList: [], |
| | | canSelectPerson: false, |
| | | rules: { |
| | | work: [ |
| | | { |
| | | work: [{ |
| | | required: true, |
| | | message: "请选择车间", |
| | | trigger: ["change"], |
| | | }, |
| | | ], |
| | | taskNo: [ |
| | | { |
| | | }, ], |
| | | taskNo: [{ |
| | | required: true, |
| | | message: "请选择报工单号", |
| | | trigger: ["change", "blur"], |
| | | }, |
| | | ], |
| | | name: [ |
| | | { |
| | | }, ], |
| | | name: [{ |
| | | required: true, |
| | | message: "请选择工序", |
| | | trigger: ["change", "blur"], |
| | | }, |
| | | ], |
| | | moOn: [ |
| | | { |
| | | }, ], |
| | | moOn: [{ |
| | | required: true, |
| | | message: "请选择订单号", |
| | | trigger: ["change", "blur"], |
| | | }, |
| | | ], |
| | | productType: [ |
| | | { |
| | | }, ], |
| | | productType: [{ |
| | | required: true, |
| | | message: "请选择报工类型", |
| | | trigger: ["change"], |
| | | }, |
| | | ], |
| | | receive: [ |
| | | { |
| | | }, ], |
| | | receive: [{ |
| | | required: true, |
| | | message: "请选择接收零件类型", |
| | | trigger: ["change"], |
| | | }, |
| | | ], |
| | | status: [ |
| | | { |
| | | }, ], |
| | | status: [{ |
| | | required: true, |
| | | message: "请选择报工方式", |
| | | trigger: ["change"], |
| | | }, |
| | | ], |
| | | Persons: [ |
| | | { |
| | | }, ], |
| | | Persons: [{ |
| | | required: true, |
| | | message: "请选择人员", |
| | | trigger: ["change"], |
| | | }, |
| | | ], |
| | | }, ], |
| | | }, |
| | | showSave: false, |
| | | operationTaskId: "", |
| | |
| | | showModal: false, |
| | | personShowModal: false, |
| | | checkboxList: [], |
| | | index: 0, |
| | | }; |
| | | }, |
| | | // 点击提交按钮的事件处理函数 |
| | |
| | | that.codeInfoId = codeInfo.id; |
| | | // 扫描报工单二维码 |
| | | that.saveForm(codeInfo); |
| | | that.getHandelList(); |
| | | // that.getHandelList(); |
| | | } |
| | | if (codeInfo.ES) { |
| | | // 扫描报工单二维码 |
| | | that.CopperReportingWork(codeInfo); |
| | | } |
| | | if (codeInfo.BN) { |
| | | // 扫描报工单二维码 |
| | | that.CopperReportingWork(codeInfo); |
| | | that.$refs.saveForm.saveForm(codeInfo); |
| | | } |
| | | } |
| | | }); |
| | |
| | | cancelSelection(){}, |
| | | // 铜杆报工 |
| | | CopperReportingWork(val) { |
| | | this.$refs.uForm.validate((valid) => { |
| | | if (valid) { |
| | | const copperList = {}; |
| | | copperList.outBatchNo = val.BN |
| | | copperList.partNo = val.PN |
| | |
| | | copperList.productStaffs = this.form.productStaffs; |
| | | this.form.productOutputList = []; |
| | | this.form.operationTaskId = this.form.id; |
| | | this.form.dutyRecordId = this.dutyId; |
| | | 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.InventoryReceiptList.unshift(this.form); |
| | | // this.getHandelList(); |
| | | this.$u.toast("报工成功"); |
| | | }); |
| | | } else { |
| | | // 可以获取具体的错误信息 |
| | | const errors = this.$refs.uForm.getError(); |
| | | } |
| | | }); |
| | | }, |
| | | // 点击确认后获取取消报工记录 |
| | |
| | | }, |
| | | // 获取人员列表 |
| | | getPersonList(dutyId) { |
| | | console.log('111111') |
| | | console.log('111111', dutyId) |
| | | try { |
| | | this.$u.api.workReporting.getPersonByDutyRecordId({ id: dutyId }).then((res) => { |
| | | this.$u.api.workReporting.getPersonByDutyRecordId({ |
| | | id: dutyId |
| | | }).then((res) => { |
| | | |
| | | this.selectedPersons = res.data.map(item => ({ |
| | | ...item, |
| | | checked: this.form.status === 'false' |
| | |
| | | }) |
| | | .then((res) => { |
| | | console.log("res", res); |
| | | this.detailedList.splice(this.index, 1) |
| | | this.showModal = false; |
| | | this.getHandelList(); |
| | | // this.getHandelList(); |
| | | this.$u.toast("取消报工成功"); |
| | | }); |
| | | }, |
| | |
| | | this.showModal = false; // 关闭弹窗 |
| | | }, |
| | | // 取消报工 |
| | | cancelReport(item) { |
| | | cancelReport(item,index) { |
| | | let that = this; |
| | | that.index = index; |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "是否确认取消批次" + item.outBatchNo + "的报工", |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | getHandelList() { |
| | | this.$u.api.workReporting |
| | | .getProductMainV1({ |
| | | current: 1, |
| | | size: -1, |
| | | id: this.codeInfoId, |
| | | }) |
| | | .then((res) => { |
| | | this.InventoryReceiptList = res.data.productOutputList; |
| | | }); |
| | | }, |
| | | // 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.simplifyMaterials = val.value; |
| | | // } |
| | | // }, |
| | | handleUpdate() { |
| | | handleUpdate(val) { |
| | | this.subdisabled = true; |
| | | this.getHandelList(); |
| | | // this.getHandelList(); |
| | | this.InventoryReceiptList.unshift(val); |
| | | }, |
| | | // 打开弹框--后面还需要监听扫码枪扫码结果,赋值给报工单号字段,然后打开弹框选择订单号等操作 |
| | | open() { |
| | |
| | | url: '/pages/product/report/index', |
| | | icon: 'one' |
| | | }, |
| | | // { |
| | | // name: '取消报工', |
| | | // url: '/pages/product/cancelReport/index', |
| | | // icon: 'two' |
| | | // }, |
| | | { |
| | | name: '取消报工', |
| | | url: '/pages/product/cancelReport/index', |
| | | icon: 'two' |
| | | }, |
| | | // { |
| | | // name: '接收(铜杆)', |
| | | // url: '/pages/product/receive/index', |
| | | // icon: 'three' |
| | | // }, |
| | | { |
| | | name: '车间订单下发', |
| | | url: '/pages/product/WorkshopOrderIssued/index', |
| | | icon: 'four' |
| | | }, |
| | | { |
| | | name: '车间取消下发', |
| | | url: '/pages/product/WorkshopOrderCancellationIssued/index', |
| | | icon: 'five' |
| | | }, |
| | | // { |
| | | // name: '车间订单下发', |
| | | // url: '/pages/product/WorkshopOrderIssued/index', |
| | | // icon: 'four' |
| | | // }, |
| | | // { |
| | | // name: '车间取消下发', |
| | | // url: '/pages/product/WorkshopOrderCancellationIssued/index', |
| | | // icon: 'five' |
| | | // }, |
| | | ] |
| | | }, |
| | | { |