|
|
@@ -47,7 +47,8 @@
|
|
|
<view class="rx ww50 ">
|
|
|
<view class="lable lable150 rx-cc ">物料代号</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="it.extInfo.materielCode"></input>
|
|
|
+ <view v-if='isDetails'>{{it.extInfo.materielCode }}</view>
|
|
|
+ <input class="uni-input" v-else v-model="it.extInfo.materielCode"></input>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -55,7 +56,8 @@
|
|
|
<view class="rx ww50">
|
|
|
<view class="lable lable150 rx-cc ">客户代号</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="it.extInfo.clientCode"></input>
|
|
|
+ <view v-if='isDetails'>{{it.extInfo.clientCode }}</view>
|
|
|
+ <input class="uni-input" v-else v-model="it.extInfo.clientCode"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -66,7 +68,8 @@
|
|
|
<view class="rx ww50 ">
|
|
|
<view class="lable lable150 rx-cc ">刻码</view>
|
|
|
<view class="content content_num ">
|
|
|
- <input class="uni-input" v-model="it.extInfo.engrave"></input>
|
|
|
+ <view v-if='isDetails'>{{it.extInfo.engrave }}</view>
|
|
|
+ <input class="uni-input" v-else v-model="it.extInfo.engrave"></input>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -74,7 +77,8 @@
|
|
|
<view class="rx ww50">
|
|
|
<view class="lable lable150 rx-cc ">位置</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="it.extInfo.position"></input>
|
|
|
+ <view v-if='isDetails'>{{it.extInfo.position }}</view>
|
|
|
+ <input class="uni-input" v-else v-model="it.extInfo.position"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -98,13 +102,14 @@
|
|
|
<view class="tr row rx-sc">
|
|
|
<view class="item ww25">{{it.extInfo.weight}}</view>
|
|
|
<view class="item ww25 content_num">
|
|
|
- <input class="uni-input" v-model="it.extInfo.reportWeight"></input>
|
|
|
+ <view v-if='isDetails'>{{it.extInfo.reportWeight }}</view>
|
|
|
+ <input class="uni-input" v-else v-model="it.extInfo.reportWeight"></input>
|
|
|
</view>
|
|
|
<view class="item ww25" @click="openNumerate(it, idx)">
|
|
|
<view class="numerate">点击计算</view>
|
|
|
</view>
|
|
|
<view class="item ww25">
|
|
|
- {{it.extInfo.deal }}
|
|
|
+ {{it.extInfo.taskName }}
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
@@ -121,40 +126,42 @@
|
|
|
|
|
|
<u-popup :show="show" mode='center' v-if='show' :closeOnClickOverlay='false'>
|
|
|
<view class="popup_box">
|
|
|
-
|
|
|
- <view class="content_table2">
|
|
|
- <view class="head row rx-sc">
|
|
|
- <view class="item ww25">物料重量Kg</view>
|
|
|
- <view class="item ww25">坯体密度</view>
|
|
|
- <view class="item ww30">产品密度系数</view>
|
|
|
- <view class="item ww20">标准</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="table">
|
|
|
-
|
|
|
- <view class="tr row rx-sc" v-for="(item, index) in rowIt" :key='index'>
|
|
|
- <view class="item ww25 rx-bc">
|
|
|
- <view>{{item.deal}}</view>
|
|
|
- <view>{{item.weight}}</view>
|
|
|
+
|
|
|
+ <view class="content_table2">
|
|
|
+ <view class="head row rx-sc">
|
|
|
+ <view class="item ww25">物料重量Kg</view>
|
|
|
+ <view class="item ww25">坯体密度</view>
|
|
|
+ <view class="item ww30">产品密度系数</view>
|
|
|
+ <view class="item ww20">标准</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="table">
|
|
|
+
|
|
|
+ <view class="tr row rx-sc" v-for="(item, index) in rowIt" :key='index'>
|
|
|
+ <view class="item ww25 rx-bc">
|
|
|
+ <view>{{item.taskName}}</view>
|
|
|
+ <view style="margin-right: 12rpx;">{{item.weight}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="item ww25 content_num">
|
|
|
+ <input class="uni-input" v-model="item.billet" type="digit"
|
|
|
+ @input="changeInp(item, index)"></input>
|
|
|
+ </view>
|
|
|
+ <view class="item ww30 content_num">
|
|
|
+ <input class="uni-input" v-model="item.density" type="digit"
|
|
|
+ @input="changeInp(item, index)"></input>
|
|
|
+ </view>
|
|
|
+ <view class="item ww20">
|
|
|
+ {{item.result}}
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
- <view class="item ww25 content_num">
|
|
|
- <input class="uni-input" v-model="item.billet" type="digit" @input="changeInp(item, index)"></input>
|
|
|
- </view>
|
|
|
- <view class="item ww30 content_num" >
|
|
|
- <input class="uni-input" v-model="item.density" type="digit" @input="changeInp(item, index)"></input>
|
|
|
- </view>
|
|
|
- <view class="item ww20">
|
|
|
- {{item.result}}
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="reportWeight">报工重量: {{reportWeight}}</view>
|
|
|
-
|
|
|
- </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
<view class="operate_box rx-sc">
|
|
|
@@ -185,6 +192,12 @@
|
|
|
list: {
|
|
|
type: Array,
|
|
|
default: () => []
|
|
|
+ },
|
|
|
+
|
|
|
+ isDetails: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -245,78 +258,113 @@
|
|
|
|
|
|
|
|
|
getSteps() {
|
|
|
- console.log(this.item)
|
|
|
+
|
|
|
getTaskInstanceList(this.item.workOrderId).then(res => {
|
|
|
this.stepsList = res
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
|
|
|
openNumerate(row, idx) {
|
|
|
- if(!row.extInfo.reportWeight) {
|
|
|
- uni.showToast({
|
|
|
- icon:'none',
|
|
|
+ if (!row.extInfo.reportWeight) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
title: '请先输入报工重量'
|
|
|
- })
|
|
|
+ })
|
|
|
return false
|
|
|
}
|
|
|
this.reportWeight = row.extInfo.reportWeight
|
|
|
- this.rowIt = [
|
|
|
- {
|
|
|
- weight: row.extInfo.weight,
|
|
|
- billet: 0.45,
|
|
|
- density: 0.7,
|
|
|
- result: (Number(row.extInfo.weight) / 0.45 * 0.7).toFixed(2),
|
|
|
- deal: 'PIP',
|
|
|
- idx
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- weight: row.extInfo.weight,
|
|
|
- billet: 0.46,
|
|
|
- density: 1.1,
|
|
|
- result: (Number(row.extInfo.weight) / 0.6* 1.1).toFixed(2) ,
|
|
|
- deal: '粗车',
|
|
|
- idx
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- weight: row.extInfo.weight,
|
|
|
- billet: 0.47,
|
|
|
- density: 1.6,
|
|
|
- result: (Number(row.extInfo.weight) / 0.47 * 1.6).toFixed(2),
|
|
|
- deal: '高温',
|
|
|
- idx
|
|
|
- }
|
|
|
- ]
|
|
|
+
|
|
|
+ if (this.isDetails) {
|
|
|
+ this.rowIt = row.extInfo.calculate
|
|
|
+ } else {
|
|
|
+ this.rowIt = [{
|
|
|
+ weight: row.extInfo.weight,
|
|
|
+ billet: 0.45,
|
|
|
+ density: 0.7,
|
|
|
+ result: (Number(row.extInfo.weight) / 0.45 * 0.7).toFixed(2),
|
|
|
+ taskName: 'PIP',
|
|
|
+ taskCode: '1',
|
|
|
+ idx
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ weight: row.extInfo.weight,
|
|
|
+ billet: 0.46,
|
|
|
+ density: 1.1,
|
|
|
+ result: (Number(row.extInfo.weight) / 0.6 * 1.1).toFixed(2),
|
|
|
+ taskName: '粗车',
|
|
|
+ taskCode: '2',
|
|
|
+ idx
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ weight: row.extInfo.weight,
|
|
|
+ billet: 0.47,
|
|
|
+ density: 1.6,
|
|
|
+ result: (Number(row.extInfo.weight) / 0.47 * 1.6).toFixed(2),
|
|
|
+ taskName: '高温',
|
|
|
+ taskCode: '3',
|
|
|
+ idx
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
this.show = true
|
|
|
},
|
|
|
-
|
|
|
- changeInp(item,index) {
|
|
|
- this.rowIt[index]['result'] = (Number(item.weight) / item.billet * item.density).toFixed(2)
|
|
|
-
|
|
|
+
|
|
|
+ changeInp(item, index) {
|
|
|
+ this.rowIt[index]['result'] = (Number(item.weight) / item.billet * item.density).toFixed(2)
|
|
|
+
|
|
|
},
|
|
|
|
|
|
cancel() {
|
|
|
this.show = false
|
|
|
this.rowIt = []
|
|
|
- this.reportWeight = 0
|
|
|
+ this.reportWeight = 0
|
|
|
},
|
|
|
|
|
|
save() {
|
|
|
-
|
|
|
+
|
|
|
let _idx = this.rowIt[0].idx
|
|
|
- let _deal = null
|
|
|
- if(this.reportWeight >= this.rowIt[0].result && this.reportWeight < this.rowIt[1].result) {
|
|
|
- _deal = this.rowIt[0].deal
|
|
|
- } else if(this.reportWeight >= this.rowIt[1].result && this.reportWeight < this.rowIt[2].result) {
|
|
|
- _deal = this.rowIt[1].deal
|
|
|
- } else if(this.reportWeight >= this.rowIt[2].result ) {
|
|
|
- _deal = this.rowIt[2].deal
|
|
|
+ let _taskCode = null
|
|
|
+ let _taskName = null
|
|
|
+
|
|
|
+ if (this.reportWeight >= this.rowIt[0].result && this.reportWeight < this.rowIt[1].result) {
|
|
|
+ _taskCode = this.rowIt[0].taskCode
|
|
|
+ _taskName = this.rowIt[0].taskName
|
|
|
+ } else if (this.reportWeight >= this.rowIt[1].result && this.reportWeight < this.rowIt[2].result) {
|
|
|
+ _taskCode = this.rowIt[1].taskCode
|
|
|
+ _taskName = this.rowIt[1].taskName
|
|
|
+ } else if (this.reportWeight >= this.rowIt[2].result) {
|
|
|
+ _taskCode = this.rowIt[2].taskCode
|
|
|
+ _taskName = this.rowIt[2].taskName
|
|
|
}
|
|
|
-
|
|
|
- if(_deal) {
|
|
|
- this.list[_idx].extInfo.deal = _deal
|
|
|
+
|
|
|
+ if (_taskCode) {
|
|
|
+
|
|
|
+ let _taskId = null
|
|
|
+ this.stepsList.forEach(e => {
|
|
|
+ if (e.taskTypeName == _taskName) {
|
|
|
+ _taskId = e.taskId
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
+
|
|
|
+ if (_taskId == null) {
|
|
|
+ uni.showToast({
|
|
|
+ title: `工序匹配不到${_taskName}`,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ this.list[_idx].extInfo.taskCode = _taskCode
|
|
|
+ this.list[_idx].extInfo.taskName = _taskName
|
|
|
+ this.list[_idx].extInfo.calculate = this.rowIt
|
|
|
+ this.list[_idx].extInfo.taskId = _taskId
|
|
|
+
|
|
|
}
|
|
|
this.cancel()
|
|
|
},
|
|
|
@@ -493,12 +541,12 @@
|
|
|
.ww25 {
|
|
|
width: 25%;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.ww30 {
|
|
|
width: 30%;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.head {
|
|
|
@@ -578,7 +626,7 @@
|
|
|
|
|
|
.popup_box {
|
|
|
width: 94vw;
|
|
|
- padding: 16rpx 12rpx;
|
|
|
+ padding: 16rpx 12rpx;
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
|
|
@@ -593,7 +641,8 @@
|
|
|
width: 160rpx;
|
|
|
}
|
|
|
}
|
|
|
- .reportWeight{
|
|
|
+
|
|
|
+ .reportWeight {
|
|
|
font-size: 24rpx;
|
|
|
font-style: normal;
|
|
|
font-weight: 400;
|