|
@@ -6,35 +6,35 @@
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">仓库</view>
|
|
|
- <view class="right">仓库仓库仓库仓库仓库1</view>
|
|
|
+ <view class="right">{{detailData.warehouseName}}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">合同编号</view>
|
|
|
- <view class="right">仓库仓库仓库仓库仓库1</view>
|
|
|
+ <view class="right">{{detailData.contractNo}}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">货名</view>
|
|
|
- <view class="right">仓库仓库仓库仓库仓库1</view>
|
|
|
+ <view class="right">{{detailData.goodsName}}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">车牌号</view>
|
|
|
- <view class="right">仓库仓库仓库仓库仓库1</view>
|
|
|
+ <view class="right">{{detailData.carNumber}}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">仓位号</view>
|
|
|
- <view class="right">仓库仓库仓库仓库仓库1</view>
|
|
|
+ <view class="right">{{detailData.binNumber}}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">囤位号</view>
|
|
|
- <view class="right">仓库仓库仓库仓库仓库1</view>
|
|
|
+ <view class="right">{{detailData.storageNumber}}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">出库类型</view>
|
|
|
- <view class="right">仓库仓库仓库仓库仓库1</view>
|
|
|
+ <view class="right">{{detailData.inOutType}}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">货名</view>
|
|
|
- <view class="right">仓库仓库仓库仓库仓库1</view>
|
|
|
+ <view class="right">{{detailData.goodsName}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content1">
|
|
@@ -43,15 +43,16 @@
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">皮重(公斤)</view>
|
|
|
- <input class="right-bottom" placeholder="输入皮重"></input>
|
|
|
+ <view class="right">{{detailData.tare}}</view>
|
|
|
+ <!-- <input class="right-bottom" placeholder="输入皮重"></input> -->
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">毛重(公斤)</view>
|
|
|
- <input class="right-bottom" placeholder="输入毛重"></input>
|
|
|
+ <input class="right-bottom" placeholder="输入毛重" v-model="grossWeight"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom" style="border: 0;">
|
|
|
<view class="left">净重(公斤)</view>
|
|
|
- <input class="right-bottom" disabled placeholder="自动计算"></input>
|
|
|
+ <input class="right-bottom" disabled placeholder="自动计算" v-model="detailData.netWeight"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content2">
|
|
@@ -62,12 +63,13 @@
|
|
|
</view>
|
|
|
<u-toast ref="uToast"/>
|
|
|
<u-button type="primary" class="submit" @click="submit">提交</u-button>
|
|
|
-
|
|
|
+ <u-toast ref="uToast" />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import upload from '@/components/upload.vue';
|
|
|
+ import helper from '@/common/helper.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
upload
|
|
@@ -78,16 +80,39 @@
|
|
|
maxSize: 50 * 1024 * 1024, //限制文件大小 50M
|
|
|
btnLoading: false, //防止重复点击
|
|
|
isAdd: true,
|
|
|
- detailData: {
|
|
|
- name: ""
|
|
|
- }
|
|
|
+ detailData: {},
|
|
|
+ id:'',
|
|
|
+ grossWeight:''
|
|
|
}
|
|
|
},
|
|
|
onShow() {},
|
|
|
onLoad(options) {
|
|
|
+ this.id = helper.detailData.id
|
|
|
+ this.getGrossWeight()
|
|
|
// this.detailData = JSON.parse(options.detailData)
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ grossWeight(val){
|
|
|
+ console.log(val)
|
|
|
+ this.detailData.grossWeight = val
|
|
|
+ this.detailData.netWeight = parseFloat(this.detailData.grossWeight)-parseFloat(this.detailData.tare)
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ getGrossWeight(){
|
|
|
+ this.$api.doRequest('get', '/weighingManagement/getWeighingManagement', {
|
|
|
+ id: this.id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ console.log(res)
|
|
|
+ this.detailData = res.data.data
|
|
|
+ console.log(helper.selectContractNo.contractNo)
|
|
|
+ if (helper.selectContractNo.contractNo) {
|
|
|
+ this.detailData.contractNo = helper.selectContractNo.contractNo;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
filterFileType(index, lists) {
|
|
|
if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
|
|
|
lists.splice(index, 1);
|
|
@@ -102,6 +127,7 @@
|
|
|
},
|
|
|
getImgUrl(res) {
|
|
|
console.log(res)
|
|
|
+ // this.detailData.pictureAddress =
|
|
|
console.log('------------res-----------')
|
|
|
},
|
|
|
onError(error) {
|
|
@@ -113,18 +139,31 @@
|
|
|
console.log(e)
|
|
|
},
|
|
|
onRemove(index) {},
|
|
|
- submit(){
|
|
|
- let that = this
|
|
|
- uni.showModal({
|
|
|
- content:"确定提交检斤信息?",
|
|
|
- success() {
|
|
|
+ submit(){
|
|
|
+ let that = this;
|
|
|
+ if(this.detailData.)
|
|
|
+ uni.showModal({
|
|
|
+ content:"确定提交检斤信息?",
|
|
|
+ success() {
|
|
|
+ debugger
|
|
|
+ console.log(that.detailData)
|
|
|
+ that.$api.doRequest('post', '/weighingManagement/api/editTare',that.detailData).then(res => {
|
|
|
+ if(res.data.code==200){
|
|
|
that.$refs.uToast.show({
|
|
|
- title: '提交成功',
|
|
|
- type: 'success',
|
|
|
- })
|
|
|
+ title: '提交成功',
|
|
|
+ type: 'success',
|
|
|
+ url: '/pages/erpbusiness/acquisitionInspection/acquisitionInspection'
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ title: '提交失败',
|
|
|
+ type: 'error',
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|