|
@@ -29,33 +29,28 @@
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">皮重(吨)</view>
|
|
|
- <input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入皮重"></input>
|
|
|
+ <input @input='calculate' v-model='detailData.tare' class="right-bottom" placeholder="输入皮重"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">净重(吨)</view>
|
|
|
- <input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
|
|
|
+ <input @input='calculate' v-model='detailData.netWeight' class="right-bottom"
|
|
|
placeholder="不可编辑,自动计算"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom" v-if="detailData.type == '潮粮'">
|
|
|
<view class="left">扣重比</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入扣重比"></input>
|
|
|
+ <input v-model='detailData.deductWeight' class="right-bottom" placeholder="输入扣重比"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom" v-if="detailData.type == '潮粮'">
|
|
|
<view class="left">干粮水分(%)</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入干粮水分占比"></input>
|
|
|
+ <input v-model='detailData.waterMin' class="right-bottom" placeholder="输入干粮水分占比"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom" v-if="detailData.type == '潮粮'">
|
|
|
<view class="left">潮粮水分(%)</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入潮粮水分占比"></input>
|
|
|
+ <input v-model='detailData.waterContent' class="right-bottom" placeholder="输入潮粮水分占比"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom" v-if="detailData.type == '潮粮'">
|
|
|
<view class="left">纯重(吨)</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="不可编辑,自动计算"></input>
|
|
|
+ <input v-model='detailData.pureWeight' class="right-bottom" placeholder="不可编辑,自动计算"></input>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">品级</view>
|
|
@@ -66,7 +61,7 @@
|
|
|
<view class="row">
|
|
|
<view class="left">经办人</view>
|
|
|
<view @click='show6=true'>{{detailData.agent}}</view>
|
|
|
- <u-picker :range="handlerList" range-key="name" @confirm='handlerPicker($event)' v-model="show6"
|
|
|
+ <u-picker :range="handlerList" range-key="staffName" @confirm='handlerPicker($event)' v-model="show6"
|
|
|
mode="selector">
|
|
|
</u-picker>
|
|
|
</view>
|
|
@@ -74,33 +69,19 @@
|
|
|
<view class="left">出库日期</view>
|
|
|
<view @click='show7=true'>{{detailData.inOutDate}}</view>
|
|
|
<u-picker v-model="show7" mode="time" @confirm='dateChange($event)' :params="params">
|
|
|
- <!-- <view >{{detailData.inOutDate ? detailData.inOutDate:"请选择日期" }}</view> -->
|
|
|
</u-picker>
|
|
|
- <!-- <u-calendar v-model="show4" mode="date" @change='dateChange'></u-calendar> -->
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="left">出库类型</view>
|
|
|
- <view @click='show5=true'>请选择入库类型</view>
|
|
|
- <u-picker :range="warehousingTypeList" range-key="type" @confirm='warehousingTypePicker($event)'
|
|
|
+ <view @click='show5=true'>{{detailData.inOutType}}</view>
|
|
|
+ <u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
|
|
|
v-model="show5" mode="selector">
|
|
|
</u-picker>
|
|
|
</view>
|
|
|
- <view class="row">
|
|
|
+ <view class="row row-bottom">
|
|
|
<view class="left">车牌号</view>
|
|
|
- <view @click='slectCarNo'>{{detailData.carNo}}</view>
|
|
|
+ <input v-model='detailData.carNumber' class="right-bottom" placeholder="请输入车牌号"></input>
|
|
|
</view>
|
|
|
- <!-- <view class="row row-bottom has-btn">
|
|
|
- <view class="left">成本(元/吨)</view>
|
|
|
- <input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="自动获取"></input>
|
|
|
- <u-button class="edit-btn">编辑</u-button>
|
|
|
- </view>
|
|
|
- <view class="row row-bottom has-btn">
|
|
|
- <view class="left">运费(元/吨)</view>
|
|
|
- <input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="自动获取"></input>
|
|
|
- <u-button class="edit-btn">编辑</u-button>
|
|
|
- </view> -->
|
|
|
</view>
|
|
|
<view class="content2">
|
|
|
<view class="left">上传磅单</view>
|
|
@@ -114,49 +95,44 @@
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">质检员</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入质检员姓名"></input>
|
|
|
+ <input v-model='detailData.qualityInspector' class="right-bottom" placeholder="输入质检员姓名"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">水分(%)</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入水分占比"></input>
|
|
|
+ <input v-model='detailData.waterContent' class="right-bottom" placeholder="输入水分占比"></input>
|
|
|
</view>
|
|
|
- <view class="row row-bottom" style="border: 0;">
|
|
|
+ <view class="row row-bottom">
|
|
|
<view class="left">容重(克/升)</view>
|
|
|
- <input v-model='detailData.netWeight' class="right-bottom" disabled placeholder="输入容重"></input>
|
|
|
+ <input v-model='detailData.bulkDensity' class="right-bottom" placeholder="输入容重"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">热损伤(%)</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入热损伤占比"></input>
|
|
|
+ <input v-model='detailData.jiaorenli' class="right-bottom" placeholder="输入热损伤占比"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">杂质(%)</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入杂质占比"></input>
|
|
|
+ <input v-model='detailData.impurity' class="right-bottom" placeholder="输入杂质占比"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">霉变粒(%)</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入霉变粒占比"></input>
|
|
|
+ <input v-model='detailData.mildewGrain' class="right-bottom" placeholder="输入霉变粒占比"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">不完善粒(%)</view>
|
|
|
- <input v-model='detailData.grossWeight' class="right-bottom"
|
|
|
- placeholder="输入不完善粒占比"></input>
|
|
|
+ <input v-model='detailData.imperfectGrain' class="right-bottom" placeholder="输入不完善粒占比"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
<u-toast ref="uToast" />
|
|
|
<view class="bottom-btn">
|
|
|
- <u-button type="primary" class="submit" hover-class="none" @click="submit">暂存</u-button>
|
|
|
- <u-button type="primary" class="submit" hover-class="none" @click="submit">提交</u-button>
|
|
|
+ <u-button type="primary" class="submit" hover-class="none" @click="submit(1)">暂存</u-button>
|
|
|
+ <u-button type="primary" class="submit" hover-class="none" @click="submit(2)">提交</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import upload from '@/components/upload.vue';
|
|
|
+ import helper from '@/common/helper.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
upload
|
|
@@ -207,19 +183,7 @@
|
|
|
name: "等外"
|
|
|
}
|
|
|
],
|
|
|
- warehousingTypeList: [{
|
|
|
- type: "采购入库"
|
|
|
- },
|
|
|
- {
|
|
|
- type: "采购入库"
|
|
|
- },
|
|
|
- {
|
|
|
- type: "采购入库"
|
|
|
- },
|
|
|
- {
|
|
|
- type: "采购入库"
|
|
|
- }
|
|
|
- ],
|
|
|
+ warehousingTypeList: [],
|
|
|
action: this.$uploadUrl,
|
|
|
maxSize: 50 * 1024 * 1024, //限制文件大小 50M
|
|
|
btnLoading: false, //防止重复点击
|
|
@@ -232,6 +196,7 @@
|
|
|
grade: "请输入品级",
|
|
|
agent: "请选择经办人",
|
|
|
inOutDate: "请选择出库日期",
|
|
|
+ inOutType: "请选择出库类型",
|
|
|
qualityInspectionManagement: {}
|
|
|
},
|
|
|
params: {
|
|
@@ -242,18 +207,38 @@
|
|
|
minute: true,
|
|
|
second: true
|
|
|
},
|
|
|
+ inOutDate1: "",
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.id = options.id
|
|
|
this.cangId = options.cangId
|
|
|
},
|
|
|
onShow() {
|
|
|
- // this.getWeighingManagement()
|
|
|
+ //出库类型
|
|
|
+ this.outWarehouse()
|
|
|
+ //经办人
|
|
|
+ this.handler()
|
|
|
},
|
|
|
methods: {
|
|
|
- contractNopicker(e) {},
|
|
|
+ outWarehouse(){
|
|
|
+ this.$api.doRequest('get', '/commonSysParameter/getInfo', {
|
|
|
+ constId: 'CON6'
|
|
|
+ }).then(res => {
|
|
|
+ this.warehousingTypeList = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handler(){
|
|
|
+ this.$api.doRequest('get', '/staff/query/getStaffListByCompIdAndWarehouseId', {
|
|
|
+ compId:helper.erpWarehouse.compId,
|
|
|
+ warehouseId:helper.erpWarehouse.warehouseId
|
|
|
+ }).then(res => {
|
|
|
+ this.handlerList = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ contractNopicker(e) {
|
|
|
+
|
|
|
+ },
|
|
|
typePicker(e) {
|
|
|
this.detailData.type = this.typeList[e].type
|
|
|
},
|
|
@@ -261,13 +246,14 @@
|
|
|
this.detailData.grade = this.pjList[e].type
|
|
|
},
|
|
|
handlerPicker(e) {
|
|
|
- this.detailData.agent = this.handlerList[e].name
|
|
|
+ this.detailData.agent = this.handlerList[e].staffName
|
|
|
},
|
|
|
dateChange(e) {
|
|
|
this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
|
|
|
+ this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + "-" + e.hour + "-" + e.minute + "-" + e.second
|
|
|
},
|
|
|
warehousingTypePicker(e) {
|
|
|
- console.log(e)
|
|
|
+ this.detailData.inOutType = this.warehousingTypeList[e].constValue
|
|
|
},
|
|
|
filterFileType(index, lists) {
|
|
|
if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
|
|
@@ -282,7 +268,9 @@
|
|
|
}
|
|
|
},
|
|
|
calculate() {
|
|
|
- this.detailData.netWeight = this.detailData.grossWeight - this.detailData.tare
|
|
|
+ if (this.detailData.grossWeight && this.detailData.tare) {
|
|
|
+ this.detailData.netWeight = this.detailData.grossWeight - this.detailData.tare
|
|
|
+ }
|
|
|
},
|
|
|
getImgUrl(res) {
|
|
|
this.detailData.addressUrl = res
|
|
@@ -294,10 +282,6 @@
|
|
|
console.log('------------error-----------')
|
|
|
console.log(error)
|
|
|
},
|
|
|
- contractNopicker(e) {
|
|
|
- // this.detailData.goodsName=this.contractNoList[e[0]].goodsName
|
|
|
- // this.detailData.contractNo=this.contractNoList[e[0]].contractNo
|
|
|
- },
|
|
|
binNumberpicker(e) {
|
|
|
this.detailData.binNumber = this.positionList[e[0]].binNumber
|
|
|
},
|
|
@@ -306,7 +290,6 @@
|
|
|
id: this.id
|
|
|
}).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- console.log(res)
|
|
|
this.detailData = res.data.data
|
|
|
}
|
|
|
})
|
|
@@ -330,7 +313,8 @@
|
|
|
console.log(e)
|
|
|
},
|
|
|
onRemove(index) {},
|
|
|
- submit() {
|
|
|
+ submit(num) {
|
|
|
+
|
|
|
if (!this.detailData.grossWeight) {
|
|
|
this.$api.msg('毛重不能为空')
|
|
|
return
|
|
@@ -346,20 +330,32 @@
|
|
|
this.$api.msg('毛重输入错误!')
|
|
|
return
|
|
|
}
|
|
|
+ this.detailData.compId = helper.erpWarehouse.compId
|
|
|
+ let title = ""
|
|
|
+ if(num == 1 ){
|
|
|
+ this.detailData.inOutFlag = 1
|
|
|
+ this.detailData.statusFlag = 1
|
|
|
+ title = "暂存成功"
|
|
|
+ }else if(num == 2){
|
|
|
+ this.detailData.inOutFlag = 1
|
|
|
+ this.detailData.statusFlag = 3
|
|
|
+ title = "提交成功"
|
|
|
+ }
|
|
|
let that = this
|
|
|
+ console.log(this.detailData,"提交对象")
|
|
|
+ return
|
|
|
uni.showModal({
|
|
|
- content: "确定提交检斤信息?",
|
|
|
+ content: "确定提交出库信息?",
|
|
|
success(res) {
|
|
|
if (res.confirm) {
|
|
|
- that.$api.doRequest('post', '/weighingManagement/api/editGrossWeight',
|
|
|
+ that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
|
|
|
that.detailData).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- that.$api.msg('提交成功')
|
|
|
+ that.$api.msg(title)
|
|
|
uni.navigateBack()
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -438,7 +434,7 @@
|
|
|
|
|
|
.content2 {
|
|
|
margin-top: 10px;
|
|
|
- display: flex;
|
|
|
+ // display: flex;
|
|
|
align-items: center;
|
|
|
|
|
|
.left {
|