| | |
| | | // 获取车间订单列表 |
| | | getWorkshopOrder: (params = {}) => vm.$u.get('/mes/plan/manufacturingOrder/page', params), |
| | | // 获取产出列表 |
| | | getProductMainV1: (params = {}) => vm.$u.get('/mes/operationTask/getxxMainList'+ params.id), |
| | | getProductMainV1: (params = {}) => vm.$u.get('/mes/operationTask/getxxMainList/'+ params.id), |
| | | // 报工提交获取详细信息 |
| | | operationTask: (params = {}) => vm.$u.get('/mes/operationTask/'+ params.id), |
| | | // 提交 |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | showModal:false, |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: "fixed", |
| | |
| | | //扫码成功后的回调,你可以写自己的逻辑代码在这里 |
| | | console.log("扫码结果:", data.code); |
| | | that.scanHandle(data.code); |
| | | this.showModal = true; |
| | | that.$forceUpdate(); |
| | | }); |
| | | }, |
| | |
| | | url: "/pages/product/report/orderList", |
| | | }); |
| | | }, |
| | | |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | onShow() { |
| | | let that = this; |
| | | uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器 |
| | | if ((form.moNO = null)) { |
| | | if ((that.form.moNO = null)) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "请先选择订单号!", |
| | |
| | | }); |
| | | return; |
| | | } |
| | | if ((form.moNO = null)) { |
| | | if ((that.form.moNO = null)) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "扫描的二维码与该订单不一致", |
| | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | operationTaskId: { |
| | | operationTaskList: { |
| | | type: Object, |
| | | required: true, |
| | | default: () => ({}), |
| | |
| | | this.$refs.uModal.clearLoading(); // 清除加载状态 |
| | | return; |
| | | } |
| | | this.operationTaskList.operationTaskId = this.operationTaskList.id |
| | | this.form.operationTaskId = this.operationTaskList.id |
| | | this.operationTaskList.productOutputList = []; // 创建一个空数组 |
| | | this.operationTaskList.productOutputList.push(this.form); // 向数组中添加元素 |
| | | console.log('this.operationTaskList',this.operationTaskList) |
| | | this.$u.api.workReporting |
| | | .submitPDA({ ...this.form, operationTaskId: this.operationTaskId.id }) |
| | | .submitPDA(this.operationTaskList) |
| | | .then((res) => { |
| | | console.log("res", res); |
| | | this.$emit('update') |
| | | this.$refs.uModal.cancel(); |
| | | }); |
| | |
| | | this.form = {}; |
| | | }, |
| | | open(val) { |
| | | console.log('11daidecanshuskk',val) |
| | | this.show = true; |
| | | this.form = val; |
| | | this.form = val.data; |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | <u-radio name="投料">投料</u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="工序" prop="value11"> |
| | | <u-form-item label="工序" prop="value1"> |
| | | <u-checkbox-group> |
| | | <u-checkbox |
| | | :name="item.name" |
| | | v-for="(item, index) in checkboxList" |
| | | :key="index" |
| | | v-model="item.value11" |
| | | v-model="item.value1" |
| | | @change="changeCheckbox" |
| | | :disabled="subdisabled || item.disabled" |
| | | > |
| | |
| | | <view class="_label-name">数量:</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value1 }} |
| | | {{ item.netWeight }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | |
| | | </modalBg> |
| | | <saveForm |
| | | ref="saveForm" |
| | | :operationTaskId="this.form" |
| | | :operationTaskList="this.form" |
| | | @update="handleUpdate" |
| | | /> |
| | | <scan></scan> |
| | |
| | | ], |
| | | InventoryReceiptList: [], |
| | | form: { |
| | | workstationId: "", |
| | | work: "", |
| | | taskNo: "", |
| | | name: "", |
| | |
| | | Jianqtyfinished: "", |
| | | proposedLocation: "", |
| | | productType: "dep", |
| | | receive: "mo", // 复选框组的值 |
| | | receive: "mo", |
| | | materialcost: "", |
| | | autoReport: false, |
| | | simplifyMaterials: false, |
| | |
| | | // 点击提交按钮的事件处理函数 |
| | | onNavigationBarButtonTap() { |
| | | this.$refs.uForm.validate((valid) => { |
| | | if (valid) { |
| | | uni.showLoading({ |
| | | if (valid) { |
| | | uni.showLoading({ |
| | | mask: true, |
| | | title: "加载中", |
| | | }); |
| | | console.log("验证通过"); |
| | | // 处理提交逻辑 |
| | | this.$u.api.workReporting |
| | | .operationTask({ |
| | | id: this.form.id, |
| | | }) |
| | | .then((res) => { |
| | | console.log("res", res); |
| | | this.$refs.saveForm.open(res); |
| | | uni.hideLoading(); |
| | | }); |
| | | } else { |
| | | console.log("验证失败"); |
| | | // 可以获取具体的错误信息 |
| | | const errors = this.$refs.uForm.getError(); |
| | | console.log("错误信息:", errors); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | onShow() { |
| | | let that = this; |
| | | console.log("1111111111111"); |
| | | uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器 |
| | | uni.$on("scan", function (data) { |
| | | console.log("onscan"); |
| | | //扫码成功后的回调,你可以写自己的逻辑代码在这里 |
| | | console.log("页面扫码结果:", data.code); |
| | | if (data.code) { |
| | | let codeInfo = JSON.parse(data.code); |
| | | if (codeInfo.moOn) { |
| | |
| | | .getProductMainV1({ |
| | | current: 1, |
| | | size: -1, |
| | | operationTaskId: codeInfo.id, |
| | | id: codeInfo.id, |
| | | }) |
| | | .then((res) => { |
| | | console.log("res", res); |
| | | let InventoryReceiptList = JSON.parse(res.data.records); |
| | | that.saveInventory(InventoryReceiptList); |
| | | that.InventoryReceiptList = res.data.productOutputList; |
| | | }); |
| | | console.log("this.InventoryReceiptList", that.InventoryReceiptList); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | watch: { |
| | | "form.taskNo": function (newVal, oldVal) { |
| | | console.log("taskNo changed:", newVal, oldVal); |
| | | this.subdisabled = false; |
| | | }, |
| | | }, |
| | | methods: { |
| | | saveInventory(val) { |
| | | this.InventoryReceiptList = val; |
| | | }, |
| | | // 多选处理 |
| | | changeCheckbox(val) { |
| | | if (val.name === "工序的自动报告") { |
| | |
| | | this.$refs.modalBg.open(); |
| | | }, |
| | | // 弹框保存 |
| | | confirm() { |
| | | console.log("保存", this.form.taskNo); |
| | | }, |
| | | confirm() {}, |
| | | // 选择订单号 |
| | | openList() { |
| | | if (this.form.taskNo === "") { |
| | |
| | | }, |
| | | // 回显扫码的信息-报工单 |
| | | saveForm(val) { |
| | | console.log("回显的数据", val); |
| | | this.form = { |
| | | id: val.id, |
| | | workstationId: val.workstationId, |
| | | work: val.work, |
| | | taskNo: val.taskNo, |
| | | name: val.name, |
| | |
| | | size: this.pageSize |
| | | }) |
| | | .then((res) => { |
| | | console.log("res", res); |
| | | this.list = res.data.records; |
| | | this.total = res.data.total; |
| | | if (this.pageSize >= this.total) { |
| | |
| | | }); |
| | | }, |
| | | search(value) { |
| | | console.log("111", value); |
| | | if (value) { |
| | | this.list = []; |
| | | this.pageSize = 10; |
| | |
| | | moNo: value, |
| | | }) |
| | | .then((res) => { |
| | | console.log("res", res); |
| | | this.list = res.data.records; |
| | | this.total = res.data.total; |
| | | if (this.pageSize >= this.total) { |