Commit f2f7f6d9 authored by xiangzj's avatar xiangzj

UI兼容和下单取消提交接口,只是保存

parent 46b92c3c
...@@ -134,11 +134,23 @@ ...@@ -134,11 +134,23 @@
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image> <image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
</view> </view>
</view> </view>
<view class="text-block">
<text class="middle-date">街道</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<input class="middle-date-des" type="text" v-model="address.STREET"
placeholder="请输入" />
</view>
</view>
</view>
</view>
<view class="text-block text-block-last"> <view class="text-block text-block-last">
<text class="middle-date">地址</text> <text class="middle-date">地址</text>
</view> </view>
<view class="remark"> <view class="remark">
<textarea class="remark-text" v-model="address.STREET" /> <textarea class="remark-text" v-model="streetDetail" disabled/>
<!-- <textarea class="remark-text" v-model="address.STREET" disabled/> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -225,13 +237,16 @@ ...@@ -225,13 +237,16 @@
"CITY_CODE_T": "", "CITY_CODE_T": "",
"STREETCODE": "", "STREETCODE": "",
"STREETCODE_T": "", "STREETCODE_T": "",
"STREET": "" "STREET": "",
}, },
isDisabled: false, isDisabled: false,
addHead:{} addHead:{}
} }
}, },
computed: { computed: {
streetDetail() {
return this.address.REGION_T + this.address.CITY_CODE_T + this.address.STREETCODE_T + this.address.STREET
},
navHeight() { navHeight() {
return { return {
'height': `${this.sysinfo.safeArea.top + 44}px` 'height': `${this.sysinfo.safeArea.top + 44}px`
...@@ -278,7 +293,10 @@ ...@@ -278,7 +293,10 @@
try{ try{
const params = { const params = {
HEAD:{ ...this.addHead }, HEAD:{ ...this.addHead },
INFO:{ ...this.address }, INFO:{
...this.address,
STREET: this.streetDetail
},
role: "WLY001", role: "WLY001",
} }
const res = await addressImport(params) const res = await addressImport(params)
...@@ -292,6 +310,7 @@ ...@@ -292,6 +310,7 @@
...res.DATA, ...res.DATA,
NAME_ORG1: res.DATA.NAME_LAST NAME_ORG1: res.DATA.NAME_LAST
} }
this.isShow = false
uni.$emit('selectedAddress', { uni.$emit('selectedAddress', {
selectedAddress: item selectedAddress: item
}) })
......
...@@ -344,12 +344,12 @@ ...@@ -344,12 +344,12 @@
.navs-tab-item { .navs-tab-item {
position: relative; position: relative;
width: 40px; width: 60px;
height: 50rpx; height: 50rpx;
} }
.navs-tab-item_text { .navs-tab-item_text {
width: 40px; width: 60px;
text-align: center; text-align: center;
color: #333; color: #333;
font-size: 28rpx; font-size: 28rpx;
...@@ -363,7 +363,7 @@ ...@@ -363,7 +363,7 @@
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 40px; width: 60px;
height: 2px; height: 2px;
background: transparent; background: transparent;
border-radius: 1px; border-radius: 1px;
......
...@@ -401,12 +401,12 @@ ...@@ -401,12 +401,12 @@
.navs-tab-item { .navs-tab-item {
position: relative; position: relative;
width: 60px; width: 90px;
height: 50rpx; height: 50rpx;
} }
.navs-tab-item_text { .navs-tab-item_text {
width: 60px; width: 90px;
text-align: center; text-align: center;
color: #333; color: #333;
font-size: 28rpx; font-size: 28rpx;
...@@ -420,7 +420,7 @@ ...@@ -420,7 +420,7 @@
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 10px; left: 10px;
width: 40px; width: 90px;
height: 2px; height: 2px;
background: transparent; background: transparent;
border-radius: 1px; border-radius: 1px;
...@@ -686,4 +686,4 @@ ...@@ -686,4 +686,4 @@
margin-top: 56rpx; margin-top: 56rpx;
font-size: 28rpx; font-size: 28rpx;
} }
</style> </style>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<image class="popup-content-head__icon" src="@/static/image/order_success@3x.png" mode=""></image> <image class="popup-content-head__icon" src="@/static/image/order_success@3x.png" mode=""></image>
</view> </view>
<view class="popup-content-content"> <view class="popup-content-content">
<text class="popup-content-content__title">提交成功</text> <text class="popup-content-content__title">保存成功</text>
<text class="popup-content-content__title2">订单号:{{ orderInfo.OBJECT_ID }}</text> <text class="popup-content-content__title2">订单号:{{ orderInfo.OBJECT_ID }}</text>
</view> </view>
<view class="popup-content-foot"> <view class="popup-content-foot">
...@@ -155,35 +155,11 @@ ...@@ -155,35 +155,11 @@
if(res1.MSGTYPE !== 'S'){ if(res1.MSGTYPE !== 'S'){
return return
} }
}catch(e){
//TODO handle the exception
}
try{
const {
ATTACHMENT: ATTACHMENT2,
HISTORY,
INFO: INFO2,
ITEM: ITEM2
} = res1.DATA
const params2 = {
"MODE": "SUBMIT",
"INFO": INFO2,
'ITEM': ITEM2,
"ATTACHMENT": ATTACHMENT2,
"USER_BP": this.userInfo.code,
"ROLE": "WLY001"
}
const res2 = await apiUpdateGroupOrder(params2)
console.log('apiUpdateGroupOrder', res2)
if(res2.MSGTYPE !== 'S'){
return
}
const { const {
INFO: INFO3, INFO: INFO3,
ITEM: ITEM3, ITEM: ITEM3,
ATTACHMENT: ATTACHMENT3, ATTACHMENT: ATTACHMENT3,
} = res2.DATA } = res1.DATA
this.orderInfo = INFO3 this.orderInfo = INFO3
let groupOrder = { let groupOrder = {
...this.groupOrder, ...this.groupOrder,
...@@ -199,6 +175,48 @@ ...@@ -199,6 +175,48 @@
}catch(e){ }catch(e){
//TODO handle the exception //TODO handle the exception
} }
// try{
// const {
// ATTACHMENT: ATTACHMENT2,
// HISTORY,
// INFO: INFO2,
// ITEM: ITEM2
// } = res1.DATA
// const params2 = {
// "MODE": "SUBMIT",
// "INFO": INFO2,
// 'ITEM': ITEM2,
// "ATTACHMENT": ATTACHMENT2,
// "USER_BP": this.userInfo.code,
// "ROLE": "WLY001"
// }
// const res2 = await apiUpdateGroupOrder(params2)
// console.log('apiUpdateGroupOrder', res2)
// if(res2.MSGTYPE !== 'S'){
// return
// }
// const {
// INFO: INFO3,
// ITEM: ITEM3,
// ATTACHMENT: ATTACHMENT3,
// } = res2.DATA
// this.orderInfo = INFO3
// let groupOrder = {
// ...this.groupOrder,
// INFO: INFO3,
// ITEM: ITEM3,
// ATTACHMENT: ATTACHMENT3,
// }
// this.$uStore({
// name: 'groupOrder',
// value: groupOrder
// });
// this.$refs.popup.open('center')
// }catch(e){
// //TODO handle the exception
// }
}, },
change(e) { change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show); console.log('当前模式:' + e.type + ',状态:' + e.show);
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<image class="popup-content-head__icon" src="@/static/image/order_success@3x.png" mode=""></image> <image class="popup-content-head__icon" src="@/static/image/order_success@3x.png" mode=""></image>
</view> </view>
<view class="popup-content-content"> <view class="popup-content-content">
<text class="popup-content-content__title">提交成功</text> <text class="popup-content-content__title">保存成功</text>
<text class="popup-content-content__title2">订单号:{{ orderInfo.OBJECT_ID }}</text> <text class="popup-content-content__title2">订单号:{{ orderInfo.OBJECT_ID }}</text>
</view> </view>
<view class="popup-content-foot"> <view class="popup-content-foot">
...@@ -160,36 +160,11 @@ ...@@ -160,36 +160,11 @@
if(res1.MSGTYPE !== 'S'){ if(res1.MSGTYPE !== 'S'){
return return
} }
}catch(e){
//TODO handle the exception
}
try{
const {
ATTACHMENT: ATTACHMENT2,
HISTORY,
INFO: INFO2,
ITEM: ITEM2
} = res1.DATA
const params2 = {
"USER_BP": this.userInfo.code,
"ROLE": 'WLY001',
"MODE": "SUBMIT",
"info": INFO2,
'ITEM': ITEM2,
// "item_d": [],
"attachment": ATTACHMENT2
}
const res2 = await apiUpdateNoQuotaOrder(params2)
console.log('updateQuotaOrder', res2)
if(res2.MSGTYPE !== 'S'){
return
}
const { const {
INFO: INFO3, INFO: INFO3,
ITEM: ITEM3, ITEM: ITEM3,
ATTACHMENT: ATTACHMENT3, ATTACHMENT: ATTACHMENT3,
} = res2.DATA } = res1.DATA
this.orderInfo = INFO3 this.orderInfo = INFO3
let noQuotaOrder = { let noQuotaOrder = {
INFO: INFO3, INFO: INFO3,
...@@ -204,6 +179,47 @@ ...@@ -204,6 +179,47 @@
}catch(e){ }catch(e){
//TODO handle the exception //TODO handle the exception
} }
// try{
// const {
// ATTACHMENT: ATTACHMENT2,
// HISTORY,
// INFO: INFO2,
// ITEM: ITEM2
// } = res1.DATA
// const params2 = {
// "USER_BP": this.userInfo.code,
// "ROLE": 'WLY001',
// "MODE": "SUBMIT",
// "info": INFO2,
// 'ITEM': ITEM2,
// // "item_d": [],
// "attachment": ATTACHMENT2
// }
// const res2 = await apiUpdateNoQuotaOrder(params2)
// console.log('updateQuotaOrder', res2)
// if(res2.MSGTYPE !== 'S'){
// return
// }
// const {
// INFO: INFO3,
// ITEM: ITEM3,
// ATTACHMENT: ATTACHMENT3,
// } = res2.DATA
// this.orderInfo = INFO3
// let noQuotaOrder = {
// INFO: INFO3,
// ITEM: ITEM3,
// ATTACHMENT: ATTACHMENT3,
// }
// this.$uStore({
// name: 'noQuotaOrder',
// value: noQuotaOrder
// });
// this.$refs.popup.open('center')
// }catch(e){
// //TODO handle the exception
// }
}, },
change(e) { change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show); console.log('当前模式:' + e.type + ',状态:' + e.show);
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
</view> </view>
</view> </view>
<view class="order-main-middle view"> <view class="order-main-middle view">
<view class="middle-title middle-unit">
<text class="middle-title__text middle-unit__text">{{INFO.ZZFLD000001_TEXT}}</text>
</view>
<view class="middle-title"> <view class="middle-title">
<text class="middle-title__text">团购订单</text> <text class="middle-title__text">团购订单</text>
</view> </view>
...@@ -107,8 +110,8 @@ ...@@ -107,8 +110,8 @@
<text class="detal-item-value">{{item.NET_PRICE}}</text> <text class="detal-item-value">{{item.NET_PRICE}}</text>
</view> </view>
<view class="block-detal-item block-detal-item-last"> <view class="block-detal-item block-detal-item-last">
<text class="detal-item-label"></text> <text class="detal-total-label"></text>
<view class="detal-item-value"> <view class="detal-total-value">
<text class="item-value-intotal">小计:</text> <text class="item-value-intotal">小计:</text>
<text class="item-value-intotal-num">{{item.NET_VALUE}}</text> <text class="item-value-intotal-num">{{item.NET_VALUE}}</text>
</view> </view>
...@@ -217,6 +220,7 @@ ...@@ -217,6 +220,7 @@
const res = await apiGetSalesOrderDetail(params) const res = await apiGetSalesOrderDetail(params)
this.orderDetail = res.DATA this.orderDetail = res.DATA
this.DIYC = res.DIYC this.DIYC = res.DIYC
this.handleShowReceiveDetail()
}catch(e){ }catch(e){
//TODO handle the exception //TODO handle the exception
} }
...@@ -457,6 +461,7 @@ ...@@ -457,6 +461,7 @@
.detal-item-label { .detal-item-label {
color: #999; color: #999;
font-size: 24rpx; font-size: 24rpx;
flex: 1;
} }
.detal-item-file { .detal-item-file {
...@@ -467,6 +472,18 @@ ...@@ -467,6 +472,18 @@
.detal-item-value { .detal-item-value {
color: #333; color: #333;
font-size: 28rpx; font-size: 28rpx;
width: 200%;
flex: 2;
text-align: right;
justify-content: end;
}
.detal-total-label {
color: #999;
font-size: 24rpx;
}
.detal-total-value {
color: #333;
font-size: 28rpx;
} }
.item-value-intotal { .item-value-intotal {
...@@ -560,4 +577,7 @@ ...@@ -560,4 +577,7 @@
color: #F61D30; color: #F61D30;
font-size: 12px; font-size: 12px;
} }
.middle-unit__text {
font-size: 24rpx;
}
</style> </style>
...@@ -177,6 +177,7 @@ ...@@ -177,6 +177,7 @@
} }
const res = await apiGetSalesOrderDetail(params) const res = await apiGetSalesOrderDetail(params)
this.orderDetail = res.DATA this.orderDetail = res.DATA
this.handleShowReceiveDetail()
}, },
handleShowReceiveDetail() { handleShowReceiveDetail() {
this.ishowReceiveDetail = !this.ishowReceiveDetail this.ishowReceiveDetail = !this.ishowReceiveDetail
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
</view> </view>
</view> </view>
<view class="order-main-middle view"> <view class="order-main-middle view">
<view class="middle-title middle-unit">
<text class="middle-title__text middle-unit__text">{{INFO.ZZFLD000001_TEXT}}</text>
</view>
<view class="middle-title"> <view class="middle-title">
<text class="middle-title__text">{{INFO.PROCESS_TYPE_TEXT}}</text> <text class="middle-title__text">{{INFO.PROCESS_TYPE_TEXT}}</text>
</view> </view>
...@@ -509,4 +512,7 @@ ...@@ -509,4 +512,7 @@
.icon-arrow-rotate { .icon-arrow-rotate {
transform: rotate(180deg); transform: rotate(180deg);
} }
.middle-unit__text {
font-size: 24rpx;
}
</style> </style>
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
</view> </view>
</view> </view>
<view class="order-main-middle view"> <view class="order-main-middle view">
<view class="middle-title middle-unit">
<text class="middle-title__text middle-unit__text">{{INFO.ZZFLD000001_TEXT}}</text>
</view>
<view class="middle-title"> <view class="middle-title">
<text class="middle-title__text">{{INFO.PROCESS_TYPE_TEXT}}</text> <text class="middle-title__text">{{INFO.PROCESS_TYPE_TEXT}}</text>
</view> </view>
...@@ -217,6 +220,7 @@ ...@@ -217,6 +220,7 @@
const res = await apiGetSalesOrderDetail(params) const res = await apiGetSalesOrderDetail(params)
this.orderDetail = res.DATA this.orderDetail = res.DATA
this.DIYC = res.DIYC this.DIYC = res.DIYC
this.handleShowReceiveDetail()
}catch(e){ }catch(e){
//TODO handle the exception //TODO handle the exception
} }
...@@ -226,7 +230,8 @@ ...@@ -226,7 +230,8 @@
this.ishowReceiveDetail = !this.ishowReceiveDetail this.ishowReceiveDetail = !this.ishowReceiveDetail
if (this.ishowReceiveDetail === true) { if (this.ishowReceiveDetail === true) {
this.receiveInfoHeight = `${260*this.ITEM.length+285}` const heightNum = this.ITEM.length > 1 ? 160: 235
this.receiveInfoHeight = `${260*this.ITEM.length + heightNum}`
} else { } else {
this.receiveInfoHeight = '132' this.receiveInfoHeight = '132'
} }
...@@ -560,4 +565,7 @@ ...@@ -560,4 +565,7 @@
color: #F61D30; color: #F61D30;
font-size: 12px; font-size: 12px;
} }
.middle-unit__text {
font-size: 24rpx;
}
</style> </style>
...@@ -199,6 +199,7 @@ ...@@ -199,6 +199,7 @@
this.orderItem.shuntChannelsType = '' this.orderItem.shuntChannelsType = ''
this.orderItem.shuntDealer = '' this.orderItem.shuntDealer = ''
this.orderItem.shuntDealerName = '' this.orderItem.shuntDealerName = ''
this.orderItem.shuntTypeName = ''
} }
} }
}, },
...@@ -245,7 +246,11 @@ ...@@ -245,7 +246,11 @@
_this.orderItem.shuntReceiveUnitCode = data.selectShuntAdressAccountInfo.partner _this.orderItem.shuntReceiveUnitCode = data.selectShuntAdressAccountInfo.partner
_this.orderItem.receiveCityCode = data.selectShuntAdressAccountInfo.city_code _this.orderItem.receiveCityCode = data.selectShuntAdressAccountInfo.city_code
_this.orderItem.receiveCityName = data.selectShuntAdressAccountInfo.city_name _this.orderItem.receiveCityName = data.selectShuntAdressAccountInfo.city_name
_this.orderItem.receiveAddress = data.selectShuntAdressAccountInfo.street
_this.orderItem.contactNumber = data.selectShuntAdressAccountInfo.tel_number
_this.orderItem.contacPerson = data.selectShuntAdressAccountInfo.c_o_name
_this.orderItem.spurtCodeUnitName = data.selectShuntAdressAccountInfo.partner_name
_this.getReceipt(_this.orderItem.shuntDealer)
}) })
uni.$on('selectShuntCode', function(data) { uni.$on('selectShuntCode', function(data) {
console.log('监听到事件来自 selectShuntCode ,携带参数 msg 为:', data); console.log('监听到事件来自 selectShuntCode ,携带参数 msg 为:', data);
...@@ -318,19 +323,18 @@ ...@@ -318,19 +323,18 @@
} }
const { data } = await findByCustomer(params) const { data } = await findByCustomer(params)
}, },
async getReceipt(){ async getReceipt(partner = this.orderItem.customerCode){
const params = { const params = {
'partner': this.orderItem.customerCode, partner,
'role': "WLY001" 'role': "WLY001"
} }
const res = await getReceipt(params) const res = await getReceipt(params)
this.receiveUnitArr = res.data this.receiveUnitArr = res.data
if(this.orderItem.receiveUnitName == ' '){ this.orderItem.receiveUnitName = this.receiveUnitArr[0].partner_name
this.orderItem.receiveUnitName = this.receiveUnitArr[0].partner_name this.orderItem.spurtCodeUnitName = this.receiveUnitArr[0].partner_name
this.orderItem.contactNumber = this.receiveUnitArr[0].tel_number this.orderItem.contactNumber = this.receiveUnitArr[0].tel_number
this.orderItem.contacPerson = this.receiveUnitArr[0].c_o_name this.orderItem.contacPerson = this.receiveUnitArr[0].c_o_name
this.orderItem.receiveAddress = this.receiveUnitArr[0].street this.orderItem.receiveAddress = this.receiveUnitArr[0].street
}
}, },
getSelectDictDataOrigin(dictcode) { getSelectDictDataOrigin(dictcode) {
querySysDictionaryDetailsByCode({'code': dictcode}) querySysDictionaryDetailsByCode({'code': dictcode})
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
<image class="popup-content-head__icon" src="@/static/image/order_success@3x.png" mode=""></image> <image class="popup-content-head__icon" src="@/static/image/order_success@3x.png" mode=""></image>
</view> </view>
<view class="popup-content-content"> <view class="popup-content-content">
<text class="popup-content-content__title">提交成功</text> <text class="popup-content-content__title">保存成功</text>
<text class="popup-content-content__title2">订单号:{{ orderInfo.OBJECT_ID }}</text> <text class="popup-content-content__title2">订单号:{{ orderInfo.OBJECT_ID }}</text>
</view> </view>
<view class="popup-content-foot"> <view class="popup-content-foot">
...@@ -207,40 +207,12 @@ ...@@ -207,40 +207,12 @@
if(res1.MSGTYPE !== 'S'){ if(res1.MSGTYPE !== 'S'){
return return
} }
}catch(e){
//TODO handle the exception
}
try{
const {
ATTACHMENT: ATTACHMENT2,
HISTORY,
INFO: INFO2,
ITEM_INNER: ITEM_INNER2,
ITEM_OUTER: ITEM_OUTER2,
USE
} = res1.DATA
const params2 = {
"USER_BP": this.userInfo.code,
"ROLE": 'WLY001',
"MODE": "SUBMIT",
INFO: INFO2,
'ITEM_INNER': ITEM_INNER2,
"ITEM_OUTER": ITEM_OUTER2,
// "item_d": [],
// "USE": USE,
"ATTACHMENT": ATTACHMENT2
}
const res2 = await apiUpdateQuotaOrder(params2)
if(res2.MSGTYPE !== 'S'){
return
}
console.log('updateQuotaOrder', res2)
const { const {
INFO: INFO3, INFO: INFO3,
ITEM_INNER: ITEM_INNER3, ITEM_INNER: ITEM_INNER3,
ITEM_OUTER: ITEM_OUTER3, ITEM_OUTER: ITEM_OUTER3,
ATTACHMENT: ATTACHMENT3, ATTACHMENT: ATTACHMENT3,
} = res2.DATA } = res1.DATA
this.orderInfo = INFO3 this.orderInfo = INFO3
let quotaOrder = { let quotaOrder = {
INFO: INFO3, INFO: INFO3,
...@@ -256,6 +228,52 @@ ...@@ -256,6 +228,52 @@
}catch(e){ }catch(e){
//TODO handle the exception //TODO handle the exception
} }
// try{
// const {
// ATTACHMENT: ATTACHMENT2,
// HISTORY,
// INFO: INFO2,
// ITEM_INNER: ITEM_INNER2,
// ITEM_OUTER: ITEM_OUTER2,
// USE
// } = res1.DATA
// const params2 = {
// "USER_BP": this.userInfo.code,
// "ROLE": 'WLY001',
// "MODE": "SUBMIT",
// INFO: INFO2,
// 'ITEM_INNER': ITEM_INNER2,
// "ITEM_OUTER": ITEM_OUTER2,
// // "item_d": [],
// // "USE": USE,
// "ATTACHMENT": ATTACHMENT2
// }
// const res2 = await apiUpdateQuotaOrder(params2)
// if(res2.MSGTYPE !== 'S'){
// return
// }
// console.log('updateQuotaOrder', res2)
// const {
// INFO: INFO3,
// ITEM_INNER: ITEM_INNER3,
// ITEM_OUTER: ITEM_OUTER3,
// ATTACHMENT: ATTACHMENT3,
// } = res2.DATA
// this.orderInfo = INFO3
// let quotaOrder = {
// INFO: INFO3,
// ITEM_INNER: ITEM_INNER3,
// ITEM_OUTER: ITEM_OUTER3,
// ATTACHMENT: ATTACHMENT3,
// }
// this.$uStore({
// name: 'quotaOrder',
// value: quotaOrder
// });
// this.$refs.popup.open('center')
// }catch(e){
// //TODO handle the exception
// }
}, },
change(e) { change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show); console.log('当前模式:' + e.type + ',状态:' + e.show);
......
...@@ -51,6 +51,10 @@ ...@@ -51,6 +51,10 @@
<text class="middle-date">剩余可用量</text> <text class="middle-date">剩余可用量</text>
<text class="middle-date-des">{{item.AVAILABLE_QTY}}</text> <text class="middle-date-des">{{item.AVAILABLE_QTY}}</text>
</view> </view>
<view class="text-block">
<text class="middle-date">系统标识</text>
<text class="middle-date-des">{{item.SYS_FLAG === "X" ? '老系统' : "新系统"}}</text>
</view>
</view> </view>
<!-- </uni-swipe-action-item> <!-- </uni-swipe-action-item>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="uni-list-cell-db"> <view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerYearChange" mode="date" <picker class="picker-block" @change="bindPickerYearChange" mode="date"
:value="condition.GJAHR" fields='year'> :value="condition.GJAHR" fields='year'>
<text class="uni-input">{{condition.GJAHR}}</text> <text class="uni-input-text">{{condition.GJAHR}}</text>
</picker> </picker>
</view> </view>
</view> </view>
...@@ -25,10 +25,14 @@ ...@@ -25,10 +25,14 @@
<view class="middle-date-des uni-list picker-year"> <view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell"> <view class="uni-list-cell">
<view class="uni-list-cell-db"> <view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerMonthChange" mode="date" <picker class="picker-block" @change="bindPickerMonthChange" range-key='name' mode="selector"
:value="condition.MONAT" :range="monthArr">
<text class="uni-input-text">{{condition.MONAT}}</text>
</picker>
<!-- <picker class="picker-block" @change="bindPickerMonthChange" mode="date"
:value="condition.MONAT" fields="month"> :value="condition.MONAT" fields="month">
<text class="uni-input">{{condition.MONAT}}</text> <text class="uni-input">{{condition.MONAT}}</text>
</picker> </picker> -->
</view> </view>
</view> </view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> <image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
...@@ -116,15 +120,19 @@ ...@@ -116,15 +120,19 @@
apiSalesPlanSelect, apiSalesPlanSelect,
apiSalesPlanTypesSelect apiSalesPlanTypesSelect
} from '@/servers/common.js' } from '@/servers/common.js'
import {
querySysDictionaryDetailsByCode,
} from '@/servers/purchaseList.js'
import timeFormat from '@/uview-ui/libs/function/timeFormat.js' import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
export default { export default {
data() { data() {
return { return {
monthArr: [],
isOpened: 'none', isOpened: 'none',
loadingText: '加载中...', loadingText: '加载中...',
condition: { condition: {
year: '', GJAHR: '',
MONAT: '', MONAT: '',
PLAN_TYPE: '' PLAN_TYPE: ''
}, },
...@@ -226,8 +234,18 @@ ...@@ -226,8 +234,18 @@
this.getSalesPlanTypes(); this.getSalesPlanTypes();
this.reset() this.reset()
this.getSalesPlan(true); this.getSalesPlan(true);
this.getSelectDictDataOrigin('month')
}, },
methods: { methods: {
getSelectDictDataOrigin(dictcode) {
querySysDictionaryDetailsByCode({'code': dictcode})
.then(res => {
if(res.data.Rows.length>0){
this.monthArr = [...res.data.Rows]
}
})
.catch(() => {})
},
async getSalesPlan(isRefresh) { async getSalesPlan(isRefresh) {
if (this.loadParams.isDone) { if (this.loadParams.isDone) {
return return
...@@ -310,7 +328,7 @@ ...@@ -310,7 +328,7 @@
}] }]
} }
const res = await apiSalesPlanTypesSelect(params) const res = await apiSalesPlanTypesSelect(params)
this.selectedSalePlanTypes = res.DATA this.selectedSalePlanTypes = [{'VALUE_ID': '','VALUE_KT': '全部'},...res.DATA]
}, },
search() { search() {
this.reset() this.reset()
...@@ -322,12 +340,12 @@ ...@@ -322,12 +340,12 @@
this.condition.PLAN_TYPE = this.selectedSalePlanTypes[this.typesIndex].VALUE_ID this.condition.PLAN_TYPE = this.selectedSalePlanTypes[this.typesIndex].VALUE_ID
}, },
bindPickerYearChange(e) { bindPickerYearChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.condition.GJAHR = e.detail.value this.condition.GJAHR = e.detail.value
console.log('picker发送年度选择改变,携带值为',this.condition.GJAHR, typeof e.detail.value)
}, },
bindPickerMonthChange(e) { bindPickerMonthChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('picker发送选择改变,携带值为', e.detail.value)
this.condition.MONAT = e.detail.value this.condition.MONAT = this.monthArr[e.detail.value].value
}, },
handleChecked(e, item, index) { handleChecked(e, item, index) {
console.log('当前索引:', e, index); console.log('当前索引:', e, index);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment