|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view class="content">
|
|
|
+ <view @click='hidden' class="content">
|
|
|
<view class="content1">
|
|
|
<view class="row1">
|
|
|
<view class="title">{{dataList.warehouseName}}</view>
|
|
@@ -42,7 +42,9 @@
|
|
|
车牌号-{{index1+1}}
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
- <u-input v-model="item1.carNo" placeholder="输入7位车牌号" />
|
|
|
+ <input v-model='item1.carNo' @click.stop="handleShowKeyboard(index,index1)":disabled="true" placeholder="输入7位车牌号" name="input"></input>
|
|
|
+
|
|
|
+ <!-- <u-input v-model="item1.carNo" placeholder="输入7位车牌号" /> -->
|
|
|
<view class="btn">
|
|
|
<view @click="addCarNumber(item.carNumberList)" style="margin-right: 20rpx;">
|
|
|
<image class='row4-img'
|
|
@@ -56,6 +58,7 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
<view class='add-good-people' @click='addGoodPeople'>
|
|
|
<image class="img"
|
|
@@ -63,6 +66,7 @@
|
|
|
@click="reduceBtn(index)"></image>增加货主
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="carNo" @keyboardClick="handleClick"></master-keyboard>
|
|
|
<u-button class='submit' @click='submit'>提交</u-button>
|
|
|
<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
|
|
|
:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
|
|
@@ -77,15 +81,17 @@
|
|
|
import {
|
|
|
mapState
|
|
|
} from 'vuex';
|
|
|
-
|
|
|
+ import keyboard from "@/components/master-keyboard/master-keyboard.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
-
|
|
|
+ keyboard
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
isShowAlert: false,
|
|
|
isShowAlert1: false,
|
|
|
+ index:0,
|
|
|
+ index1:0,
|
|
|
content: '当前登入信息验证失败,是否重新登录?',
|
|
|
content1: '确定提交送粮信息?',
|
|
|
// show: false,
|
|
@@ -94,6 +100,7 @@
|
|
|
name: '123'
|
|
|
}],
|
|
|
nameList: [],
|
|
|
+ carNo:'',
|
|
|
warehouseNameAddress: '',
|
|
|
startDate: "",
|
|
|
dataList: {
|
|
@@ -138,10 +145,85 @@
|
|
|
console.log("hasLogin", this.hasLogin)
|
|
|
},
|
|
|
methods: {
|
|
|
+ hidden(){
|
|
|
+ this.carNo=''
|
|
|
+ if(this.$refs.keyboard.open){
|
|
|
+ this.$refs.keyboard.open(false)//true 键盘显示 false 键盘隐藏
|
|
|
+ }else{
|
|
|
+ this.$refs.keyboard[0].open(false)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleShowKeyboard(index,index1){
|
|
|
+ if(this.dataList.shippingInformationList[this.index].carNumberList[this.index1].carNo==''){
|
|
|
+ this.carNo=''
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.carNo=this.dataList.shippingInformationList[this.index].carNumberList[this.index1].carNo
|
|
|
+ }
|
|
|
+ if(this.$refs.keyboard.open){
|
|
|
+ this.$refs.keyboard.open(false)//true 键盘显示 false 键盘隐藏
|
|
|
+ }else{
|
|
|
+ this.$refs.keyboard[0].open(false)
|
|
|
+ }
|
|
|
+ this.index=index
|
|
|
+ this.index1=index1
|
|
|
+ if(this.$refs.keyboard.open){
|
|
|
+ this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
|
|
|
+ }else{
|
|
|
+ this.$refs.keyboard[0].open(true)
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ handleClick(e){
|
|
|
+ this.carNo=e.value
|
|
|
+ this.dataList.shippingInformationList[this.index].carNumberList[this.index1].carNo = e.value //键盘输入值
|
|
|
+ },
|
|
|
showCustomerName(value, index) {
|
|
|
this.selectObj = value
|
|
|
this.selectObj.index = index
|
|
|
value.showCustomerName = true
|
|
|
+ that.$api.doRequest('get', '/paymentManagement/cumulant', {
|
|
|
+ compId: JSON.parse(localStorage.getItem('pcUserInfo')).data.compId,
|
|
|
+ customerNumberCard: that.detailData.customerNumberCard,
|
|
|
+ goodsName: that.detailData.goodsName,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ for (let i = 0; i < that.purchasePriceList.length; i++) {
|
|
|
+ if (
|
|
|
+ that.detailData.goodsName == that.purchasePriceList[i]
|
|
|
+ .goodsName
|
|
|
+ ) {
|
|
|
+ let count = (that.purchasePriceList[i].saleLimit -
|
|
|
+ res.data.data / 1000).toFixed(2)
|
|
|
+ if (Number(count) - that.detailData.grossWeight / 1000 <= 0) {
|
|
|
+ that.$api.msg('该客户累计销售' + that.detailData.goodsName + (
|
|
|
+ res.data.data / 1000).toFixed(2) +
|
|
|
+ '吨,还可售粮' +
|
|
|
+ count + '吨', )
|
|
|
+
|
|
|
+ } else {
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/weighingManagement/api/editGrossWeight', that
|
|
|
+ .detailData).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ title: '提交成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ uni.navigateBack({})
|
|
|
+ } else {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ title: '提交失败',
|
|
|
+ type: 'error',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
getCustomer() {
|
|
|
let _data = {
|