|
@@ -7,17 +7,17 @@
|
|
|
@click="inputDialogToggle(item)">
|
|
|
<text class="text">{{item.mtrName||'空'}}</text>
|
|
|
<view class="progressContainer">
|
|
|
- <view class="progress" :style="{ height: Math.round(item.mtrResidue) + '%' }"
|
|
|
+ <view class="progress" :style="{ height: Math.round(item.mtrResidue/20) + '%' }"
|
|
|
v-if="item.exprStatus==='0'">
|
|
|
<view class="progress-view"></view>
|
|
|
</view>
|
|
|
<view class="progress"
|
|
|
- :style="{ height: Math.round(item.mtrResidue) + '%', backgroundColor:'#ff0000'}" v-else>
|
|
|
+ :style="{ height: Math.round(item.mtrResidue/20) + '%', backgroundColor:'#ff0000'}" v-else>
|
|
|
<view class="progress-view"></view>
|
|
|
</view>
|
|
|
- <text class="errMsg" v-if="item.exprStatus==='1'">即将到期</text>
|
|
|
- <text class="errMsg" v-if="item.mtrResidue <= item.residueWarn">原料不足</text>
|
|
|
- <text class="tip">{{item.mtrResidue || '0'}}ml</text>
|
|
|
+ <text class="expMsg" v-if="item.exprCloseStatus==='1' && item.exprStatus==='0' ">即将到期</text>
|
|
|
+ <text class="errMsg" v-if="parseInt(item.mtrResidue) <= parseInt(item.residueWarn)">原料不足</text>
|
|
|
+ <text class="tip">{{parseInt(item.mtrResidue) || '0'}}ml</text>
|
|
|
</view>
|
|
|
|
|
|
<view class="num">
|
|
@@ -96,7 +96,7 @@
|
|
|
</uni-col>
|
|
|
<uni-col :span="12">
|
|
|
<view class="uni-col light">{{material.mtrResidue || '0'}}ml
|
|
|
- ({{material.mtrResidue > material.residueWarn?'原料充足':'原料不足' }})</view>
|
|
|
+ ({{parseInt(material.mtrResidue) > parseInt(material.residueWarn)?'原料充足':'原料不足' }})</view>
|
|
|
</uni-col>
|
|
|
</uni-row>
|
|
|
<uni-row class="uni-row">
|
|
@@ -143,7 +143,7 @@
|
|
|
<text style="line-height: 25px;height:25px;">{{form.mtName||'空'}}</text>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item class="form-item" label="余量" name="surplus">
|
|
|
- <uni-number-box :min="0" :max="100" v-model="form.surplus" :disabled="true">
|
|
|
+ <uni-number-box :min="0" :max="2000" v-model="form.surplus" :disabled="true">
|
|
|
</uni-number-box>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item class="form-item" label="换料原料" name="replaceMaterial">
|
|
@@ -161,7 +161,7 @@
|
|
|
</picker>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item class="form-item" label="换料规格" name="specs">
|
|
|
- <uni-number-box :min="0" :max="100" v-model="form.specs"></uni-number-box>
|
|
|
+ <uni-number-box :min="0" :max="2000" v-model="form.specs"></uni-number-box>
|
|
|
</uni-forms-item>
|
|
|
</uni-forms>
|
|
|
<uni-row class="uni-row" style="margin-top: 200rpx">
|
|
@@ -385,7 +385,8 @@
|
|
|
'surplus': row.mtrResidue,
|
|
|
'date': row.exprTime,
|
|
|
'barrelCode': row.barrelCode,
|
|
|
- 'equId': row.equId
|
|
|
+ 'equId': row.equId,
|
|
|
+ 'replaceMaterial': row.mtrId
|
|
|
}
|
|
|
console.log(this.form)
|
|
|
this.$refs.editDialog.open()
|
|
@@ -400,6 +401,7 @@
|
|
|
});
|
|
|
}
|
|
|
//console.log(this.form)
|
|
|
+ this.equMaterials.unshift({id:'', mtName: '请选择'});
|
|
|
},
|
|
|
editClose() {
|
|
|
this.editShow = false
|
|
@@ -446,6 +448,13 @@
|
|
|
let page = pages[pages.length - 1].$page.fullPath;
|
|
|
let equId = page.split('equId=')[1]
|
|
|
equId = equId? equId: ""
|
|
|
+ if(this.form.replaceMaterial==null || this.form.replaceMaterial==""){
|
|
|
+ return uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '修正物料不能为空',
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
+ }
|
|
|
util.request(api.RecordAdd, this.form, "POST", "application/json").then(function(res) {
|
|
|
if (res.code === 0) {
|
|
|
uni.showToast({
|
|
@@ -515,11 +524,22 @@
|
|
|
|
|
|
.grid-item-box .errMsg {
|
|
|
position: absolute;
|
|
|
- left: 30%;
|
|
|
- top: 120rpx;
|
|
|
+ left: 28%;
|
|
|
+ top: 180rpx;
|
|
|
+ font-size: 36rpx;
|
|
|
+ width: 80rpx;
|
|
|
+ color: #f0ad4e;
|
|
|
+ z-index: 9999;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .grid-item-box .expMsg {
|
|
|
+ position: absolute;
|
|
|
+ left: 28%;
|
|
|
+ top: 60rpx;
|
|
|
font-size: 36rpx;
|
|
|
width: 80rpx;
|
|
|
- color: #ff0000;
|
|
|
+ color: #f0ad4e;
|
|
|
z-index: 9999;
|
|
|
margin: 0 auto;
|
|
|
}
|