Commit ed9fb6a1 by zhangzhen

细节功能优化

parent 140c2825
{ {
"prompt": "template" "prompt" : "template"
} }
...@@ -199,6 +199,13 @@ export const getSelectList = (params,pageData) => { ...@@ -199,6 +199,13 @@ export const getSelectList = (params,pageData) => {
return http.post(url, d) return http.post(url, d)
} }
export const getMerchantList = (params,pageData) => {
let url = `/service/S_CG_SH_01`
let d = setParamsData(params,pageData)
return http.post(url, d)
}
export const getSubList = (params,pageData) => { export const getSubList = (params,pageData) => {
let url = `/service/S_CW_FK_05` let url = `/service/S_CW_FK_05`
...@@ -212,12 +219,22 @@ export const save = (data) => { ...@@ -212,12 +219,22 @@ export const save = (data) => {
return http.post(url, d) return http.post(url, d)
} }
// 审核
export const updateSubmitStatus = (data) => { export const updateSubmitStatus = (data) => {
let url = `/service/S_XS_KK_03` let url = `/service/S_CW_FK_02`
let d = setResultData(data);
return http.post(url, d)
}
// 核销
export const updateWriteoffStatus = (data) => {
let url = `/service/S_CW_FK_04`
let d = setResultData(data); let d = setResultData(data);
return http.post(url, d) return http.post(url, d)
} }
export const getProList = (params,pageData) => { export const getProList = (params,pageData) => {
let url = `/service/S_CW_SP_03` let url = `/service/S_CW_SP_03`
let d = setParamsData(params,pageData) let d = setParamsData(params,pageData)
......
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
"splashscreen" : { "splashscreen" : {
"androidStyle" : "default", "androidStyle" : "default",
"android" : { "android" : {
"hdpi" : "C:/Users/w/Desktop/引导页/引导页/引导页.png", "hdpi" : "C:/Users/w/Desktop/引导页/引导页.png",
"xhdpi" : "C:/Users/w/Desktop/引导页/引导页/引导页.png", "xhdpi" : "C:/Users/w/Desktop/引导页/引导页.png",
"xxhdpi" : "C:/Users/w/Desktop/引导页/引导页/引导页.png" "xxhdpi" : "C:/Users/w/Desktop/引导页/引导页.png"
}, },
"useOriginalMsgbox" : true, "useOriginalMsgbox" : true,
"iosStyle" : "storyboard", "iosStyle" : "storyboard",
......
...@@ -445,6 +445,7 @@ ...@@ -445,6 +445,7 @@
} }
.swiper-box{ .swiper-box{
width: 100%; width: 100%;
height: 168px;
.swiper-item{ .swiper-item{
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -164,14 +164,14 @@ ...@@ -164,14 +164,14 @@
<view v-else class="form-content-box"> <view v-else class="form-content-box">
<form> <form>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"> <view class="title title-2">
<text class="text-xl text-red">*</text> <text class="text-xl text-red">*</text>
<text>公司名称:</text> <text>公司名称:</text>
</view> </view>
<view class="text-blue"> <view class="text-blue">
<picker @change="onFactoryChange" :value="factoryIndex" :range="factoryList" <picker @change="onFactoryChange" :value="factoryIndex" :range="factoryList"
range-key="label"> range-key="label">
<view class="uni-input"> <view class="flex-row-center uni-input">
<text <text
class="text-blue">{{ factoryIndex >=0 ? factoryList[factoryIndex].label:'请选择'}}</text> class="text-blue">{{ factoryIndex >=0 ? factoryList[factoryIndex].label:'请选择'}}</text>
<text class="cuIcon-right"></text> <text class="cuIcon-right"></text>
...@@ -179,8 +179,26 @@ ...@@ -179,8 +179,26 @@
</picker> </picker>
</view> </view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"> <view class="title title-2">
<text class="text-xl text-red">*</text>
<text>供应商名称:</text>
</view>
<view class="text-blue">
<picker @change="onMerchantChange" :value="merchantIndex" :range="merchantList"
range-key="label">
<view class="uni-input">
<text
class="text-blue">{{ merchantIndex >=0 ? merchantList[merchantIndex].label:'请选择'}}</text>
<text class="cuIcon-right"></text>
</view>
</picker>
</view>
</view>
<view class="cu-form-group">
<view class="title title-2">
<text class="text-xl text-red">*</text> <text class="text-xl text-red">*</text>
<text>付款总额:</text> <text>付款总额:</text>
</view> </view>
...@@ -190,7 +208,7 @@ ...@@ -190,7 +208,7 @@
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"> <view class="title title-2">
<text class="text-xl text-red">*</text> <text class="text-xl text-red">*</text>
<text>付款日期:</text> <text>付款日期:</text>
</view> </view>
...@@ -224,6 +242,7 @@ ...@@ -224,6 +242,7 @@
} from "@/api/index.js" } from "@/api/index.js"
import { import {
save, save,
getMerchantList,
saveBySelect saveBySelect
} from "@/api/payment-order.js"; } from "@/api/payment-order.js";
import { import {
...@@ -243,10 +262,18 @@ ...@@ -243,10 +262,18 @@
signingDate: '', signingDate: '',
totalContractPriceIncluding: '', totalContractPriceIncluding: '',
reviewStatus: '3', reviewStatus: '3',
contractDate: moment().format("YYYY-MM-DD") signingDate: moment().format("YYYY-MM-DD")
},
queryData: {},
pageData:{
showCount: "true",
limit:500,
offset:0
}, },
factoryList: [], factoryList: [],
factoryIndex: -1, factoryIndex: -1,
merchantList: [],
merchantIndex: -1,
selectList:[], selectList:[],
editIndex:'' editIndex:''
}; };
...@@ -264,13 +291,29 @@ ...@@ -264,13 +291,29 @@
} }
}) })
}) })
getMerchantList(this.queryData,this.pageData).then(res => {
let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns);
if(list.length){
this.merchantList = list.map(item => {
return {
value: item.supCode,
label: item.supName
}
})
}
console.log(this.merchantList,9999)
})
}, },
onFactoryChange(e) { onFactoryChange(e) {
let index = Number(e.target.value) let index = Number(e.target.value)
if (this.factoryIndex === index) return; if (this.factoryIndex === index) return;
this.factoryIndex = index; this.factoryIndex = index;
}, },
onMerchantChange(e){
let index = Number(e.target.value)
if (this.merchantIndex === index) return;
this.merchantIndex = index;
},
onNavToSelect() { onNavToSelect() {
let checkedId = ''; let checkedId = '';
if(this.selectList.length){ if(this.selectList.length){
...@@ -339,7 +382,10 @@ ...@@ -339,7 +382,10 @@
...this.orderInfo, ...this.orderInfo,
companyName: this.factoryList[this.factoryIndex].label, companyName: this.factoryList[this.factoryIndex].label,
companyCode: this.factoryList[this.factoryIndex].value, companyCode: this.factoryList[this.factoryIndex].value,
signingDate: moment(this.orderInfo.signingDate).format("YYYYMMDD") partyA: this.merchantList[this.merchantIndex].label,
signingDate: moment(this.orderInfo.signingDate).format("YYYYMMDD"),
cancelStatus: '1',
reviewStatus: "0"
}).then(res => { }).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data.__sys__.status === 0) { if (res.data.__sys__.status === 0) {
...@@ -595,14 +641,16 @@ ...@@ -595,14 +641,16 @@
.cu-form-group { .cu-form-group {
height: 32px; height: 32px;
min-height: 32px; min-height: 32px;
padding: 1upx 20upx 1upx 30upx;
.title { .title {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: 260upx; width: 260upx;
align-items: center; align-items: center;
} }
.title-2{
width: 224upx;
}
.text-blue { .text-blue {
white-space: normal; white-space: normal;
} }
......
...@@ -9,6 +9,11 @@ ...@@ -9,6 +9,11 @@
<block slot="content"> <block slot="content">
<text class="text-white">结算单详情</text> <text class="text-white">结算单详情</text>
</block> </block>
<block slot="right">
<view v-if="subList && subList.length" class="right-btn" @tap="onEditOrSave">
<text class="text-white">{{isEdit? '保存' : '编辑'}}</text>
</view>
</block>
</cu-custom> </cu-custom>
<view v-if="statusBarHeight>0" class="content-black" :style="{height:statusBarHeight+45+'px'}"> <view v-if="statusBarHeight>0" class="content-black" :style="{height:statusBarHeight+45+'px'}">
...@@ -62,24 +67,25 @@ ...@@ -62,24 +67,25 @@
<text>{{orderInfo.signingDate}}</text> <text>{{orderInfo.signingDate}}</text>
</view> </view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"> <view class="title">
<text>核销状态:</text> <text>审核状态:</text>
</view> </view>
<view class=""> <view class="">
<text>{{cancelStatusEnum[orderInfo.cancelStatus]}}</text> <text>{{reviewStatusEnum[orderInfo.reviewStatus]}}</text>
</view> </view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"> <view class="title">
<text>审批状态:</text> <text>核销状态:</text>
</view> </view>
<view class=""> <view class="">
<text>{{reviewStatusEnum[orderInfo.reviewStatus]}}</text> <text>{{cancelStatusEnum[orderInfo.cancelStatus]}}</text>
</view> </view>
</view> </view>
</form> </form>
</view> </view>
</view> </view>
...@@ -119,7 +125,12 @@ ...@@ -119,7 +125,12 @@
<view class="title"> <view class="title">
<text>收款总额:</text> <text>收款总额:</text>
</view> </view>
<view class=""> <view v-if="isEdit && item.isEdit" class="">
<u-input v-model="item.totalContractPriceIncluding"
color="#0081ff" inputAlign="right" type="number" :border="border"
placeholder="请输入付款总额" />
</view>
<view v-else class="">
<text>{{item.totalContractPriceIncluding}}</text> <text>{{item.totalContractPriceIncluding}}</text>
</view> </view>
</view> </view>
...@@ -134,8 +145,13 @@ ...@@ -134,8 +145,13 @@
</view> </view>
</view> </view>
<view v-if="orderInfo.reviewStatus && orderInfo.reviewStatus!=3" class="footer-box"> <view class="footer-box">
<button class="cu-btn block bg-blue" @tap="onSubmit(1)">提交</button> <button v-if="orderInfo.reviewStatus == '0'" class="cu-btn block bg-blue" @tap="onSubmit(1)">审核通过</button>
<button v-if="orderInfo.reviewStatus == '1' && orderInfo.cancelStatus == '1' " class="cu-btn block bg-blue" @tap="onSubmit(2)">核销通过</button>
<button v-if="orderInfo.reviewStatus == '0'" class="cu-btn block bg-blue" @tap="onNavToSelect">选择采购收票</button>
</view> </view>
<u-calendar :show="show2" mode="single" :defaultDate="orderInfo.signingDate" :minDate="minDate" :monthNum='4' <u-calendar :show="show2" mode="single" :defaultDate="orderInfo.signingDate" :minDate="minDate" :monthNum='4'
@confirm="onConfirm" @close="onCancel"></u-calendar> @confirm="onConfirm" @close="onCancel"></u-calendar>
...@@ -153,7 +169,7 @@ ...@@ -153,7 +169,7 @@
import { import {
getParamsData getParamsData
} from "@/api/product-warehousing.js"; } from "@/api/product-warehousing.js";
import { getList,getSubList } from "@/api/payment-order.js"; import { getList,getSubList,updateSubmitStatus,updateWriteoffStatus } from "@/api/payment-order.js";
export default { export default {
data() { data() {
...@@ -167,19 +183,10 @@ ...@@ -167,19 +183,10 @@
statusBarHeight: uni.getStorageSync("statusHeight") || 0, statusBarHeight: uni.getStorageSync("statusHeight") || 0,
orderInfo: {}, orderInfo: {},
id: '', id: '',
submitStatusEnum:{
3:'已提交',
2:'未提交',
1:'已提交',
0:"待审核"
},
settlementTypeEnum:{
1:'部分结算',
2:'最终结算'
},
reviewStatusEnum:{}, reviewStatusEnum:{},
cancelStatusEnum:{}, cancelStatusEnum:{},
subList:[] subList:[],
isEdit:false
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -192,7 +199,40 @@ ...@@ -192,7 +199,40 @@
}, },
methods: { methods: {
onEditOrSave(){
if(this.isEdit){
this.submitType = 3;
this.content = '请确认是否进行数据保存操作?'
this.show = true
}else{
this.isEdit = true;
this.subList = this.subList.map(item => {
return {
...item,
isEdit: true
}
})
}
},
onNavToSelect() {
let checkedId = '';
if(this.selectList.length){
checkedId = this.selectList.map(item => item.id).join();
}
uni.navigateTo({
url: `/pages/payment-order/index?checkedId=${checkedId}`,
events: {
acceptDataFromOpenedPage: (data) => {
this.selectList = data.data;
this.$forceUpdate();
}
}
})
},
onSubmit(t) { onSubmit(t) {
this.submitType = t;
this.content = this.submitType ==1? '请确认是否进行审核通过操作?':"请确认是否进行核销通过操作?"
this.show = true this.show = true
}, },
onOpenCalendar() { onOpenCalendar() {
...@@ -211,22 +251,35 @@ ...@@ -211,22 +251,35 @@
uni.showLoading({ uni.showLoading({
title: "加载中..." title: "加载中..."
}) })
updateSubmitStatus({ if(this.submitType ==1){
...this.orderInfo, updateSubmitStatus(this.orderInfo).then(res => {
reviewStatus:3, uni.hideLoading();
signingDate: moment(this.orderInfo.signingDate).format("YYYYMMDD") if (res.data.__sys__.status === 0) {
}).then(res => { uni.showToast({
uni.hideLoading(); icon: "success",
if (res.data.__sys__.status === 0) { title: "操作成功"
uni.showToast({ })
icon: "success", setTimeout(() => {
title: "提交成功" this.onGetList();
}) }, 1500)
setTimeout(() => { }
this.onBack(); })
}, 1500) } else if(this.submitType ==2) {
} updateWriteoffStatus(this.orderInfo).then(res => {
}) uni.hideLoading();
if (res.data.__sys__.status === 0) {
uni.showToast({
icon: "success",
title: "操作成功"
})
setTimeout(() => {
this.onGetList();
}, 1500)
}
})
} else if(this.submitType ==3){
this.isEdit = false;
}
}, },
onBack() { onBack() {
uni.redirectTo({ uni.redirectTo({
...@@ -290,7 +343,12 @@ ...@@ -290,7 +343,12 @@
let list = toJsonData(res.data.__blocks__.result.rows, res.data.__blocks__.result.meta let list = toJsonData(res.data.__blocks__.result.rows, res.data.__blocks__.result.meta
.columns); .columns);
if (list && list.length) { if (list && list.length) {
this.subList = list this.subList = list.map(item => {
return {
...item,
totalContractPriceIncluding: Number(item.totalContractPriceIncluding)
}
})
} }
}) })
...@@ -608,14 +666,14 @@ ...@@ -608,14 +666,14 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: 100%; width: 100%;
padding: 24upx 36upx; padding: 0 36upx;
background-color: #ffffff; background-color: #ffffff;
z-index: 8; z-index: 8;
.cu-btn { .cu-btn {
display: flex; display: flex;
flex: 1; flex: 1;
margin: 0 20upx; margin: 24upx 20upx;
} }
} }
...@@ -652,4 +710,10 @@ ...@@ -652,4 +710,10 @@
.cu-form-group uni-picker::after { .cu-form-group uni-picker::after {
color: transparent; color: transparent;
} }
.right-btn{
display: flex;
justify-content: center;
align-items: center;
padding: 0 24upx;
}
</style> </style>
\ No newline at end of file
...@@ -246,6 +246,7 @@ ...@@ -246,6 +246,7 @@
let createdTime =item.createdTime? item.createdTime.split(''):[]; let createdTime =item.createdTime? item.createdTime.split(''):[];
return { return {
...item, ...item,
signingDate: moment(item.signingDate).format("YYYY-MM-DD"),
contractDate:item.contractDate? moment(item.contractDate).format("YYYY-MM-DD"):'', contractDate:item.contractDate? moment(item.contractDate).format("YYYY-MM-DD"):'',
createdTime:createdTime.length>=13? `${createdTime[0]}${createdTime[1]}${createdTime[2]}${createdTime[3]}/${createdTime[4]}${createdTime[5]}/${createdTime[6]}${createdTime[7]} ${createdTime[8]}${createdTime[9]}:${createdTime[10]}${createdTime[11]}:${createdTime[12]}${createdTime[13]}` :'' createdTime:createdTime.length>=13? `${createdTime[0]}${createdTime[1]}${createdTime[2]}${createdTime[3]}/${createdTime[4]}${createdTime[5]}/${createdTime[6]}${createdTime[7]} ${createdTime[8]}${createdTime[9]}:${createdTime[10]}${createdTime[11]}:${createdTime[12]}${createdTime[13]}` :''
} }
......
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