|
@@ -7,10 +7,10 @@
|
|
<view class="item-line">
|
|
<view class="item-line">
|
|
基本信息
|
|
基本信息
|
|
</view>
|
|
</view>
|
|
- <view class="item" v-if="customerId==='1'">
|
|
|
|
|
|
+ <view class="item" v-if="!customerId||customerId=='1'">
|
|
<view class="l"><text style="color: red;">*</text>客户:</view>
|
|
<view class="l"><text style="color: red;">*</text>客户:</view>
|
|
<view class="r">
|
|
<view class="r">
|
|
- <picker v-if="customer.list.length>0" class="p-picker" @change="customerChange($event)"
|
|
|
|
|
|
+ <picker v-if="customer.list.length>0" class="p-picker" @change="customerChange($event)"
|
|
:value="customer.index" :range="customer.list" range-key="name">
|
|
:value="customer.index" :range="customer.list" range-key="name">
|
|
<text class="p-text">{{customer.list[customer.index].name}}</text>
|
|
<text class="p-text">{{customer.list[customer.index].name}}</text>
|
|
<u-icon class="p-icon" name="arrow-down-fill" size="20"></u-icon>
|
|
<u-icon class="p-icon" name="arrow-down-fill" size="20"></u-icon>
|
|
@@ -62,7 +62,10 @@
|
|
<view slot="minus" class="minus">
|
|
<view slot="minus" class="minus">
|
|
<u-icon name="minus" size="12"></u-icon>
|
|
<u-icon name="minus" size="12"></u-icon>
|
|
</view>
|
|
</view>
|
|
- <text slot="input" style="width: 50px;text-align: center;"
|
|
|
|
|
|
+ <text v-if="item.inc==0" slot="input"
|
|
|
|
+ style="width: 50px;text-align: center;color: #E5E5E5;"
|
|
|
|
+ class="input">{{item.num}}</text>
|
|
|
|
+ <text v-else slot="input" style="width: 50px;text-align: center;"
|
|
class="input">{{item.num}}</text>
|
|
class="input">{{item.num}}</text>
|
|
<view slot="plus" class="plus">
|
|
<view slot="plus" class="plus">
|
|
<u-icon name="plus" size="12"></u-icon>
|
|
<u-icon name="plus" size="12"></u-icon>
|
|
@@ -93,7 +96,7 @@
|
|
index: 1,
|
|
index: 1,
|
|
list: ['空车', '载货']
|
|
list: ['空车', '载货']
|
|
},
|
|
},
|
|
- customerId:'1',
|
|
|
|
|
|
+ customerId: '1',
|
|
customer: {
|
|
customer: {
|
|
index: 0,
|
|
index: 0,
|
|
list: []
|
|
list: []
|
|
@@ -129,7 +132,7 @@
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
this.form.id = options.id;
|
|
this.form.id = options.id;
|
|
this.getOtherBusinessById();
|
|
this.getOtherBusinessById();
|
|
- this.customerId=uni.getStorageSync('customerId');
|
|
|
|
|
|
+ this.customerId = uni.getStorageSync('customerId');
|
|
let that = this;
|
|
let that = this;
|
|
uni.$on('getRemark', data => {
|
|
uni.$on('getRemark', data => {
|
|
that.$nextTick(function() {
|
|
that.$nextTick(function() {
|
|
@@ -144,12 +147,17 @@
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
getCustomerList() {
|
|
getCustomerList() {
|
|
- let p={judgeStatus: 2,pageNo:1,pageSize:30, type: 0}
|
|
|
|
|
|
+ let p = {
|
|
|
|
+ judgeStatus: 2,
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 30,
|
|
|
|
+ type: 0
|
|
|
|
+ }
|
|
this.$api.getCustomerList(p).then(resp => {
|
|
this.$api.getCustomerList(p).then(resp => {
|
|
- let list=resp.data;
|
|
|
|
|
|
+ let list = resp.data;
|
|
this.customer.list = list;
|
|
this.customer.list = list;
|
|
console.log(list)
|
|
console.log(list)
|
|
- this.customer.index=list.map(obj=>obj.id).indexOf(this.form.customerId);
|
|
|
|
|
|
+ this.customer.index = list.map(obj => obj.id).indexOf(this.form.customerId);
|
|
})
|
|
})
|
|
},
|
|
},
|
|
openRemarkFn(data) {
|
|
openRemarkFn(data) {
|
|
@@ -181,7 +189,7 @@
|
|
let index = e.detail.value;
|
|
let index = e.detail.value;
|
|
this.type.index = index //当前picker选中的值
|
|
this.type.index = index //当前picker选中的值
|
|
},
|
|
},
|
|
- customerChange(e){
|
|
|
|
|
|
+ customerChange(e) {
|
|
let index = e.detail.value;
|
|
let index = e.detail.value;
|
|
this.customer.index = index //当前picker选中的值
|
|
this.customer.index = index //当前picker选中的值
|
|
},
|
|
},
|
|
@@ -204,10 +212,10 @@
|
|
this.form.itemTypeId = this.itemType.id;
|
|
this.form.itemTypeId = this.itemType.id;
|
|
this.form.items = list;
|
|
this.form.items = list;
|
|
this.form.carType = this.type.list[this.type.index]
|
|
this.form.carType = this.type.list[this.type.index]
|
|
- if(this.customerId=='1'){
|
|
|
|
|
|
+ if (this.customerId == '1') {
|
|
this.form.customerId = this.customer.list[this.customer.index].id;
|
|
this.form.customerId = this.customer.list[this.customer.index].id;
|
|
- }else{
|
|
|
|
- this.form.customerId=this.customerId
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.form.customerId = this.customerId
|
|
}
|
|
}
|
|
let that = this;
|
|
let that = this;
|
|
let content = '确认修改该业务'
|
|
let content = '确认修改该业务'
|