|
@@ -27,7 +27,7 @@
|
|
<view class="c-row b-b">
|
|
<view class="c-row b-b">
|
|
<text class="tit">车牌号</text>
|
|
<text class="tit">车牌号</text>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <text>{{WarehouseInOutInfo.carNo}}</text>
|
|
|
|
|
|
+ <text>{{WarehouseInOutInfo1.carNo}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -38,16 +38,18 @@
|
|
<view class="c-list">
|
|
<view class="c-list">
|
|
<view class="cu-form-group align-start">
|
|
<view class="cu-form-group align-start">
|
|
<view class="title">毛重(吨)</view>
|
|
<view class="title">毛重(吨)</view>
|
|
- <input placeholder="请输入毛重" name="input" v-model="WarehouseInOutInfo.grossWeight"></input>
|
|
|
|
|
|
+ <input placeholder="请输入毛重" name="input" v-model="WarehouseInOutInfo.grossWeight"
|
|
|
|
+ @input="grossWeightInput"></input>
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group align-start">
|
|
<view class="cu-form-group align-start">
|
|
<view class="title">皮重(吨)</view>
|
|
<view class="title">皮重(吨)</view>
|
|
- <input placeholder="请输入皮重" name="input" v-model="WarehouseInOutInfo.tare"></input>
|
|
|
|
|
|
+ <input placeholder="请输入皮重" name="input" v-model="WarehouseInOutInfo.tare"
|
|
|
|
+ @input="tareInput"></input>
|
|
</view>
|
|
</view>
|
|
<view class="c-row b-b">
|
|
<view class="c-row b-b">
|
|
<text class="tit">净重(吨)</text>
|
|
<text class="tit">净重(吨)</text>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <text>{{WarehouseInOutInfo.grossWeight - WarehouseInOutInfo.tare > 0 ? WarehouseInOutInfo.grossWeight - WarehouseInOutInfo.tare : 0}}</text>
|
|
|
|
|
|
+ <text>{{numFilter(WarehouseInOutInfo.netWeight)}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="c-row b-b">
|
|
<view class="c-row b-b">
|
|
@@ -59,10 +61,10 @@
|
|
<view class="cu-form-group align-start">
|
|
<view class="cu-form-group align-start">
|
|
<view class="title">仓位号</view>
|
|
<view class="title">仓位号</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <input placeholder="请输入仓位号" name="input" v-model="WarehouseInOutInfo.binNumber"></input>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <input placeholder="请输入仓位号" name="input" v-model="WarehouseInOutInfo.binNumber"></input>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view class="c-row b-b">
|
|
<view class="c-row b-b">
|
|
<text class="tit">入库类型 </text>
|
|
<text class="tit">入库类型 </text>
|
|
<picker @change="ruChange" :value="ruIndex" :range="ruType" class="con-list">
|
|
<picker @change="ruChange" :value="ruIndex" :range="ruType" class="con-list">
|
|
@@ -140,7 +142,7 @@
|
|
</view>
|
|
</view>
|
|
<!-- 底部操作菜单 -->
|
|
<!-- 底部操作菜单 -->
|
|
<view class="padding flex flex-direction">
|
|
<view class="padding flex flex-direction">
|
|
- <button class="cu-btn bg-red margin-tb-sm lg" @click="commit">暂存</button>
|
|
|
|
|
|
+ <button class="cu-btn bg-red margin-tb-sm lg" @click="commit1">暂存</button>
|
|
<button class="cu-btn bg-red margin-tb-sm lg" @click="commit">提交</button>
|
|
<button class="cu-btn bg-red margin-tb-sm lg" @click="commit">提交</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -160,26 +162,51 @@
|
|
goods: {},
|
|
goods: {},
|
|
list: {},
|
|
list: {},
|
|
WarehouseInOutInfo: {
|
|
WarehouseInOutInfo: {
|
|
- warehouseInOutDetail: {}
|
|
|
|
|
|
+ warehouseInOutDetail: {},
|
|
|
|
+ pcFlag: 0,
|
|
|
|
+ contractNo: {},
|
|
|
|
+ carNo: {},
|
|
},
|
|
},
|
|
- pinIndex: 0,
|
|
|
|
|
|
+ WarehouseInOutInfo1: {
|
|
|
|
+ contractNo: {},
|
|
|
|
+ carNo: {},
|
|
|
|
+ },
|
|
|
|
+ pinIndex: '不限(默认)',
|
|
|
|
+ pinTypes: '',
|
|
pinType: ['不限(默认)', '一等品', '二等品', '三等品', '等外'],
|
|
pinType: ['不限(默认)', '一等品', '二等品', '三等品', '等外'],
|
|
- ruIndex: 0,
|
|
|
|
|
|
+ ruIndex: '采购入库',
|
|
|
|
+ rutypes: '',
|
|
ruType: ['采购入库', '移库入库', '暂存入库', '贸易服务入库', '退库'],
|
|
ruType: ['采购入库', '移库入库', '暂存入库', '贸易服务入库', '退库'],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onLoad(option){
|
|
|
|
|
|
+ onLoad(option) {
|
|
this.WarehouseInOutInfo.contractNo = option.contractNo
|
|
this.WarehouseInOutInfo.contractNo = option.contractNo
|
|
this.WarehouseInOutInfo.goodsName = option.goodsName
|
|
this.WarehouseInOutInfo.goodsName = option.goodsName
|
|
- this.WarehouseInOutInfo.startNetWeight = option.startNetWeight
|
|
|
|
- this.WarehouseInOutInfo.carNo = option.carNo+'('+ option.tranCarNo+ ')'
|
|
|
|
|
|
+ this.WarehouseInOutInfo.startWeight = option.startWeight
|
|
|
|
+ this.WarehouseInOutInfo1.carNo = option.carNo + '(' + option.tranCarNo + ')'
|
|
this.WarehouseInOutInfo.warehouseName = option.warehouseName
|
|
this.WarehouseInOutInfo.warehouseName = option.warehouseName
|
|
|
|
+ this.WarehouseInOutInfo.id = option.id
|
|
|
|
+ this.WarehouseInOutInfo.carNo = option.carNo
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ commit1() {
|
|
|
|
+ console.log(this.list)
|
|
|
|
+ this.WarehouseInOutInfo.warehouseInOutDetail = this.list
|
|
|
|
+ this.WarehouseInOutInfo.statusFlag = 1
|
|
|
|
+ this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
|
|
|
|
|
|
+ }).catch(res => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.data.message,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
commit() {
|
|
commit() {
|
|
console.log(this.list)
|
|
console.log(this.list)
|
|
this.WarehouseInOutInfo.warehouseInOutDetail = this.list
|
|
this.WarehouseInOutInfo.warehouseInOutDetail = this.list
|
|
|
|
+ this.WarehouseInOutInfo.statusFlag = 3
|
|
this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
|
|
|
|
}).catch(res => {
|
|
}).catch(res => {
|
|
@@ -190,13 +217,33 @@
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- ruChange(e){
|
|
|
|
|
|
+ numFilter(value) {
|
|
|
|
+ if (!value) {
|
|
|
|
+ return 0
|
|
|
|
+ }
|
|
|
|
+ // 截取当前数据到小数点后两位
|
|
|
|
+ let realVal = parseFloat(value).toFixed(2)
|
|
|
|
+ return realVal
|
|
|
|
+ },
|
|
|
|
+ grossWeightInput(e) {
|
|
|
|
+ this.WarehouseInOutInfo.grossWeight = e.detail.value
|
|
|
|
+ if (this.WarehouseInOutInfo.grossWeight && this.WarehouseInOutInfo.tare) {
|
|
|
|
+ this.WarehouseInOutInfo.netWeight = this.WarehouseInOutInfo.grossWeight - this.WarehouseInOutInfo.tare
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ tareInput(e) {
|
|
|
|
+ this.WarehouseInOutInfo.tare = e.detail.value
|
|
|
|
+ if (this.WarehouseInOutInfo.grossWeight && this.WarehouseInOutInfo.tare) {
|
|
|
|
+ this.WarehouseInOutInfo.netWeight = this.WarehouseInOutInfo.grossWeight - this.WarehouseInOutInfo.tare
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ ruChange(e) {
|
|
this.ruIndex = e.detail.value
|
|
this.ruIndex = e.detail.value
|
|
this.rutypes = this.ruType[this.ruIndex];
|
|
this.rutypes = this.ruType[this.ruIndex];
|
|
},
|
|
},
|
|
pinChange(e) {
|
|
pinChange(e) {
|
|
this.pinIndex = e.detail.value
|
|
this.pinIndex = e.detail.value
|
|
- this.pintypes = this.pinType[this.pinIndex];
|
|
|
|
|
|
+ this.pinTypes = this.pinType[this.pinIndex];
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
|