| | |
| | | <view class="tab-item" :class="{ active: currentTab === 0 }" @click="changeTab(0)"> |
| | | 主界面 |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 2 }" @click="changeTab(2)"> |
| | | 换模 |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 3 }" @click="changeTab(3)"> |
| | | 调机送检 |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 1 }" @click="changeTab(1)"> |
| | | 开工完工 |
| | | <view class="tab-item" :class="{ active: currentTab === 2 }" @click="changeTab(2)"> |
| | | 刀具管理 |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 4 }" @click="changeTab(4)"> |
| | | 打码报工 |
| | | 生产报工 |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 1 }" @click="changeTab(1)"> |
| | | 开工完工 |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 5 }" @click="changeTab(5)"> |
| | | e-SOP |
| | |
| | | <button class="refresh-btn" @click="refresh">刷新</button> |
| | | </view> |
| | | <view> |
| | | <h4>一幅模具同时开工多个工单设置</h4> |
| | | <h4>一台机台只能选择一条工单(多选默认为最后一条)</h4> |
| | | </view> |
| | | <view class="section top-section"> |
| | | <view class="form-row"> |
| | | <view> |
| | | <!-- <label |
| | | style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px">第一步选择机台:</label> --> |
| | | <!-- <superwei-combox :candidates="machineList" placeholder="请选择" v-model="machineName" |
| | | @select="onMachineChange" class="picker"></superwei-combox> --> |
| | | <input v-model="machineName" disabled="true" type="text" |
| | | style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px" /> |
| | | <!-- <label style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px">第一步选择机台:</label> --> |
| | | <!-- <superwei-combox :candidates="machineList" placeholder="请选择" v-model="machineName" |
| | | @select="onMachineChange" class="picker"></superwei-combox> --> |
| | | <input v-model="machineName" disabled="true" type="text" style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-row"> |
| | | <view> |
| | | <label |
| | | style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px;">第一步选择工单:</label> |
| | | <label style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px;">第一步选择工单:</label> |
| | | <button class="print-btn" @click="isShowTab">选择工单</button> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="section card"> |
| | | <uni-table border stripe emptyText="暂无更多数据" @selection-change="selectionChange"> |
| | | <uni-tr> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">工序</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">模具编号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">颜色</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">材质</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">图号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">入库数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">规格</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">已生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">报废数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">未生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">派工数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">报工人</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">选择</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in isShowTableData" :key="index"> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa001" /> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.procName" /><!--工序--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.moldId" /> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa001" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa002" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /> |
| | | </uni-td> |
| | | |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.colorName" /> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /><!--产品名称--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.material" /> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004" /><!--规格--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.engineeringNo" /> |
| | | </uni-td> |
| | | |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa011" /><!--已生产数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa010" /> |
| | | <input class="form-input" disabled="true" type="text" :value="(item.daa008 || 0) - (item.daa011 || 0)" /><!--未生产数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa011" /> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--派工数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa012" /> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--工单数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /><!--工单状态--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.staffName" /><!--报工人--> |
| | | </uni-td> |
| | | <uni-td> |
| | | <view class="uni-group"> |
| | |
| | | |
| | | <view> |
| | | <text style="color: red;"> |
| | | 说明:初始状态是,按注塑机查出所有的未完工的工单。用选择框标识机器要开工的工单. |
| | | 可以同时开工多个工单,但必须模具是一套。选择完成,点击保存选择。系统保留选中的工单。 |
| | | 说明:只能同时开工一个工单。选择完成,点击保存选择。系统保留选中的工单。 |
| | | 如果要重选,点击清空重选功能。 |
| | | </text> |
| | | </view> |
| | |
| | | </view> |
| | | <view v-if="currentTab === 0" class="tab-content"> |
| | | <WorkOrder :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" |
| | | :deviceNumber="machineName" /> |
| | | :deviceNumber="machineName" /> |
| | | </view> |
| | | <view v-if="currentTab === 1" class="tab-content"> |
| | | <!-- <!– 调用 WorkOrderStatus 组件 –>--> |
| | |
| | | </scroll-view> |
| | | |
| | | |
| | | <!-- 弹窗下拉框只显示工单状态 --> |
| | | <view v-if="isShow" class="overlay"> |
| | | <view class="popup"> |
| | | <view class="form-row"> |
| | | <view> |
| | | <label style="float: left;margin-top: 18px;">选择当前模具号:</label> |
| | | <label style="float: left;margin-top: 18px;">选择工单状态:</label> |
| | | <superwei-combox :candidates="engineeringNoMapList" placeholder="请选择" v-model="engineeringNo" |
| | | @select="onEngineeringNoChange" class="picker" |
| | | style="padding: 7px 46px;width: 650px;"></superwei-combox> |
| | | @select="onEngineeringNoChange" class="picker" |
| | | style="padding: 7px 46px;width: 650px;"></superwei-combox> |
| | | </view> |
| | | </view> |
| | | <view class="section card"> |
| | | <uni-table ref="table" type="selection" border stripe emptyText="暂无更多数据" |
| | | @selection-change="selectionChange"> |
| | | <uni-tr> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">模具编号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">颜色</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">材质</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">图号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">工单状态</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in tableData" :key="index"> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa001" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.moldId" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa002" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /> |
| | | </uni-td> |
| | | |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.colorName" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.material" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.engineeringNo" /> |
| | | </uni-td> |
| | | |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | |
| | | <div style="height: 400px; overflow: auto;"> |
| | | <table> |
| | | |
| | | <view class="section card"> |
| | | <uni-table ref="table" type="selection" border stripe emptyText="暂无更多数据" |
| | | @selection-change="selectionChange"> |
| | | <uni-tr> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">工序</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">规格</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">已生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">未生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">派工数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;width: 100px;">报工人</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in tableData" :key="index"> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.procName" /><!--工序--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa001" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa002" /> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /><!--产品名称--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004" /><!--规格--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa011" /><!--已生产数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" :value="(item.daa008 || 0) - (item.daa011 || 0)" /><!--未生产数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--派工数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--工单数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /><!--工单状态--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.staffName" /><!--报工人--> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | |
| | | </table> |
| | | </div> |
| | | |
| | | <view class="bottom-section"> |
| | | <button class="save-btn" @click="save">保存选择</button> |
| | | <button class="cancel-btn" @click="isShow = !isShow">取消</button> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | orderStatus: '', // 默认全部 |
| | | currentTab: 7, |
| | | |
| | | productCode: '', // 产品编码 |
| | | productSpec: '', // 产品规格 |
| | | |
| | | machineList: [], |
| | | |
| | |
| | | orderStatus: '开工', |
| | | selectedOrder: '', |
| | | orderId: 0, |
| | | startTime: '', |
| | | |
| | | mouldNumber: '工单带出', |
| | | usageCount: '模具带出', |
| | | alertCount: '模具带出', |
| | | completionStatus: '', |
| | | |
| | | selectedIndexs: [], |
| | | |
| | |
| | | getPrintInfo() { |
| | | var mac = "ac:f4:2c:20:0d:b4"; |
| | | |
| | | // mac = "e8:51:9e:7d:dc:95"; |
| | | // this.$post({ |
| | | // url: "/DevMachine/GetDevMachineByPdaMac", |
| | | // data: { |
| | | // pdaMac: mac, |
| | | // } |
| | | // }).then(res => { |
| | | // let devMachine = res.data.tbBillList; |
| | | // this.machineNo = devMachine.machineNo; |
| | | // this.machineName = "调试模式:" + this.machineNo + "号注塑机" |
| | | mac = "e8:51:9e:7d:dc:95"; |
| | | this.$post({ |
| | | url: "/DevMachine/GetDevMachineByPdaMac", |
| | | data: { |
| | | pdaMac: mac, |
| | | } |
| | | }).then(res => { |
| | | let devMachine = res.data.tbBillList; |
| | | this.machineNo = devMachine.machineNo; |
| | | this.machineName = "调试模式:" + this.machineNo + "号齿轮机" |
| | | |
| | | // uni.setStorageSync('machineNo', this.machineNo); |
| | | // uni.setStorageSync('printMac', devMachine.printMac); |
| | | uni.setStorageSync('machineNo', this.machineNo); |
| | | uni.setStorageSync('printMac', devMachine.printMac); |
| | | |
| | | // console.log(devMachine.printMac); |
| | | console.log(devMachine.printMac); |
| | | |
| | | // this.getWomdaaIsShow(); |
| | | // }); |
| | | this.getWomdaaIsShow(); |
| | | }); |
| | | |
| | | |
| | | if (plus.os.name == "Android") { |
| | | //获取手机MAC地址 |
| | | var Context = plus.android.importClass("android.content.Context"); |
| | | var WifiManager = plus.android.importClass("android.net.wifi.WifiManager"); |
| | | var wifiManager = plus.android.runtimeMainActivity().getSystemService(Context.WIFI_SERVICE); |
| | | var WifiInfo = plus.android.importClass("android.net.wifi.WifiInfo"); |
| | | var wifiInfo = wifiManager.getConnectionInfo(); |
| | | mac = wifiInfo.getMacAddress(); |
| | | // if (plus.os.name == "Android") { |
| | | // //获取手机MAC地址 |
| | | // var Context = plus.android.importClass("android.content.Context"); |
| | | // var WifiManager = plus.android.importClass("android.net.wifi.WifiManager"); |
| | | // var wifiManager = plus.android.runtimeMainActivity().getSystemService(Context.WIFI_SERVICE); |
| | | // var WifiInfo = plus.android.importClass("android.net.wifi.WifiInfo"); |
| | | // var wifiInfo = wifiManager.getConnectionInfo(); |
| | | // mac = wifiInfo.getMacAddress(); |
| | | |
| | | //如果mac为“02:00:00:00:00:00”,则可能是安卓6.0以上版本,则使用另一种方法获取mac地址 |
| | | if (mac == "02:00:00:00:00:00") { |
| | | mac = this.getMacNew(); |
| | | } |
| | | //如果mac使用新方法依然是“02:00:00:00:00:00”则不进行保存 |
| | | if (mac == "02:00:00:00:00:00") { |
| | | return; |
| | | } |
| | | uni.setStorageSync('pdaMac', mac); |
| | | // //如果mac为“02:00:00:00:00:00”,则可能是安卓6.0以上版本,则使用另一种方法获取mac地址 |
| | | // if (mac == "02:00:00:00:00:00") { |
| | | // mac = this.getMacNew(); |
| | | // } |
| | | // //如果mac使用新方法依然是“02:00:00:00:00:00”则不进行保存 |
| | | // if (mac == "02:00:00:00:00:00") { |
| | | // return; |
| | | // } |
| | | // uni.setStorageSync('pdaMac', mac); |
| | | |
| | | this.$post({ |
| | | url: "/DevMachine/GetDevMachineByPdaMac", |
| | | data: { |
| | | pdaMac: mac, |
| | | } |
| | | }).then(res => { |
| | | let devMachine = res.data.tbBillList; |
| | | this.machineNo = devMachine.machineNo; |
| | | this.machineName = "当前机台:" + this.machineNo + "号注塑机"; |
| | | // this.$post({ |
| | | // url: "/DevMachine/GetDevMachineByPdaMac", |
| | | // data: { |
| | | // pdaMac: mac, |
| | | // } |
| | | // }).then(res => { |
| | | // let devMachine = res.data.tbBillList; |
| | | // this.machineNo = devMachine.machineNo; |
| | | // this.machineName = "当前机台:" + this.machineNo + "号注塑机"; |
| | | |
| | | uni.setStorageSync('machineNo', this.machineNo); |
| | | uni.setStorageSync('printMac', devMachine.printMac); |
| | | // uni.setStorageSync('machineNo', this.machineNo); |
| | | // uni.setStorageSync('printMac', devMachine.printMac); |
| | | |
| | | |
| | | this.getWomdaaIsShow(); |
| | | // this.getWomdaaIsShow(); |
| | | |
| | | }); |
| | | } |
| | | // }); |
| | | // } |
| | | }, |
| | | save() { |
| | | let data = this.selectedItems(); |
| | | |
| | | if (data.length === 0) { |
| | | this.$showMessage("最少选取一个工单"); |
| | | this.$showMessage("请选择一个工单"); |
| | | return; |
| | | } |
| | | |
| | | if (data.length > 4) { |
| | | this.$showMessage("最多只能选取四个工单"); |
| | | if (data.length > 1) { |
| | | this.$showMessage("一次只能选取一个工单"); |
| | | return; |
| | | } |
| | | |
| | | let firstValue = data[0]["moldId"]; // 获取第一个对象的指定属性值 |
| | | //let firstValue = data[0]["moldId"]; // 获取第一个对象的指定属性值 |
| | | |
| | | // 使用 every 方法检查所有对象的该属性值是否一致 |
| | | let flag = data.every(item => item["moldId"] === firstValue); |
| | | if (!flag) { |
| | | this.$showMessage("选取的" + data.length + "个工单中的模具编号不一致"); |
| | | return; |
| | | } |
| | | //// 使用 every 方法检查所有对象的该属性值是否一致 |
| | | //let flag = data.every(item => item["moldId"] === firstValue); |
| | | //if (!flag) { |
| | | // this.$showMessage("选取的" + data.length + "个工单中的模具编号不一致"); |
| | | // return; |
| | | //} |
| | | |
| | | let orderSelect = []; |
| | | |
| | |
| | | if (res.data.tbBillList) { |
| | | this.getWomdaaIsShow(); |
| | | uni.showToast({ |
| | | title: '将注塑机开合模数清0', |
| | | title: '保存工单成功', |
| | | //title: '将注塑机开合模数清0', |
| | | //将值设置为 success 或者直接不用写icon这个参数 |
| | | icon: 'success', |
| | | //显示持续时间为 5秒 |
| | |
| | | return `${year}-${month}-${day}`; // 返回格式化后的字符串 |
| | | }, |
| | | selectionChange(e) { |
| | | this.selectedIndexs = []; |
| | | this.selectedIndexs = e.detail.index |
| | | // 单选直接赋值 |
| | | this.selectedIndexs = [e.detail.index]; |
| | | }, |
| | | |
| | | selectedItems() { |
| | |
| | | this.machineList = this.machine.map(s => s.machineName); |
| | | }) |
| | | }, |
| | | |
| | | //获取表格的数据源 |
| | | getWomdaaIsShow() { |
| | | this.$post({ |
| | | url: "/Womdaa/GetWomdaasByShow", |
| | |
| | | |
| | | this.engineeringNo = null; |
| | | this.tableData = []; |
| | | |
| | | this.GetWomdaasByEngineeringNo(); |
| | | //this.getWomdaa(); |
| | | // 下拉框只显示工单状态 |
| | | this.engineeringNoMapList = ['待开工', '未开工', '开工', '暂停','完工']; |
| | | // 默认显示全部工单 |
| | | this.getWomdaa(); |
| | | }, |
| | | |
| | | // 下拉框选中后,按状态筛选工单 |
| | | onEngineeringNoChange(status) { |
| | | this.engineeringNo = status; |
| | | this.getWomdaaByStatus(); |
| | | }, |
| | | getWomdaa() { |
| | | |
| | | let editDate = this.formatDate(new Date()); |
| | |
| | | url: "/Womdaa/GetWomdaasByMachine", |
| | | data: { |
| | | machineNo: this.machineNo, |
| | | engineeringNo: this.engineeringNo, |
| | | editDate: editDate |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data.tbBillList; |
| | | }) |
| | | }, |
| | | GetWomdaasByEngineeringNo() { |
| | | |
| | | this.$post({ |
| | | url: "/Womdaa/GetWomdaasByEngineeringNo", |
| | | data: { |
| | | machineNo: this.machineNo |
| | | } |
| | | }).then(res => { |
| | | this.engineeringNoList = res.data.tbBillList; |
| | | this.engineeringNoMapList = this.engineeringNoList.map(s => s.moldId + ":" + s.moldName + ":" + |
| | | s.moldModel |
| | | ); |
| | | }); |
| | | }, |
| | | // 按工单状态筛选工单 |
| | | getWomdaaByStatus() { |
| | | let editDate = this.formatDate(new Date()); |
| | | this.$post({ |
| | | url: "/Womdaa/GetWomdaasByEngineeringNo", |
| | | data: { |
| | | machineNo: this.machineNo, |
| | | orderStatus: [this.engineeringNo], // 只传选中的状态 |
| | | editDate: editDate |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data.tbBillList; |
| | | }); |
| | | }, |
| | | toDetail(item) { |
| | | this.orderId = item.id; |
| | | this.selectedOrder = item.daa001; |
| | | this.productCode = item.daa002; // 产品编码 |
| | | this.productSpec = item.daa004; // 产品规格 |
| | | this.currentTab = 0; |
| | | } |
| | | }, |