Commit 140c2825 by zhangzhen

功能完善

parent f6ccb28e
...@@ -88,7 +88,7 @@ const setResultData = (data={}) => { ...@@ -88,7 +88,7 @@ const setResultData = (data={}) => {
return paramsData return paramsData
} }
const setResultDataAndDetail = (data={},detail=[]) => { const setResultDataAndDetail = (data={},detail={}) => {
let obj = {} let obj = {}
for (let i in data) { for (let i in data) {
if (data[i] !== '') { if (data[i] !== '') {
...@@ -140,6 +140,53 @@ const setResultDataAndDetail = (data={},detail=[]) => { ...@@ -140,6 +140,53 @@ const setResultDataAndDetail = (data={},detail=[]) => {
return paramsData return paramsData
} }
const setResultDataAndParams = (list=[],params={}) => {
let paramsData = {
"__version__": "2.0",
"__sys__": {},
"__blocks__": {
"inqu_status":{
"attr": {},
"meta": {
"columns": []
},
"rows": []
},
"result": {
"attr": {},
"meta": {
"columns": []
},
"rows": []
}
}
}
let keyList = Object.keys(list[0]);
keyList.forEach((item, index) => {
paramsData.__blocks__.result.meta.columns.push({
pos: index,
name: item
})
})
list.forEach(item=>{
paramsData.__blocks__.result.rows.push(Object.values(item));
})
if( params ){
let keyList2 = Object.keys(params);
keyList2.forEach((item, index) => {
paramsData.__blocks__.inqu_status.meta.columns.push({
pos: index,
name: item
})
})
paramsData.__blocks__.inqu_status.rows.push(Object.values(params));
}
return paramsData
}
export const getList = (params,pageData) => { export const getList = (params,pageData) => {
let url = `/service/S_CW_FK_01` let url = `/service/S_CW_FK_01`
let d = setParamsData(params,pageData) let d = setParamsData(params,pageData)
...@@ -153,6 +200,12 @@ export const getSelectList = (params,pageData) => { ...@@ -153,6 +200,12 @@ export const getSelectList = (params,pageData) => {
} }
export const getSubList = (params,pageData) => {
let url = `/service/S_CW_FK_05`
let d = setParamsData(params,pageData)
return http.post(url, d)
}
export const save = (data) => { export const save = (data) => {
let url = `/service/S_CW_FK_03` let url = `/service/S_CW_FK_03`
let d = setResultData(data); let d = setResultData(data);
...@@ -166,38 +219,14 @@ export const updateSubmitStatus = (data) => { ...@@ -166,38 +219,14 @@ export const updateSubmitStatus = (data) => {
} }
export const getProList = (params,pageData) => { export const getProList = (params,pageData) => {
let url = `/service/S_CW_HT_01` let url = `/service/S_CW_SP_03`
let d = setParamsData(params,pageData) let d = setParamsData(params,pageData)
return http.post(url, d) return http.post(url, d)
} }
export const saveBySelect = (list,params) => {
export const getList3 = (params,pageData) => { let url = `/service/S_CW_SP_04`
let url = `/service/S_CW_QZ_01` let d = setResultDataAndParams(list,params);
let d = setParamsData(params,pageData)
return http.post(url, d)
}
export const getList1 = (params,pageData) => {
let url = `/service/S_CW_QZ_02`
let d = setParamsData(params,pageData)
return http.post(url, d)
}
export const getList2 = (params,pageData) => {
let url = `/service/S_CW_QZ_03`
let d = setParamsData(params,pageData)
return http.post(url, d)
}
export const getList4 = (params,pageData) => {
let url = `/service/S_CW_QZ_04`
let d = setParamsData(params,pageData)
return http.post(url, d)
}
export const getList5 = (params,pageData) => {
let url = `/service/S_CW_QZ_05`
let d = setParamsData(params,pageData)
return http.post(url, d) return http.post(url, d)
} }
......
...@@ -164,32 +164,30 @@ export const getProList = (params,pageData) => { ...@@ -164,32 +164,30 @@ export const getProList = (params,pageData) => {
return http.post(url, d) return http.post(url, d)
} }
export const getList1 = (params,pageData) => {
export const getList3 = (params,pageData) => {
let url = `/service/S_CW_QZ_01` let url = `/service/S_CW_QZ_01`
let d = setParamsData(params,pageData) let d = setParamsData(params,pageData)
return http.post(url, d) return http.post(url, d)
} }
export const getList1 = (params,pageData) => { export const getList3 = (params,pageData) => {
let url = `/service/S_CW_QZ_02` let url = `/service/S_CW_QZ_03`
let d = setParamsData(params,pageData) let d = setParamsData(params,pageData)
return http.post(url, d) return http.post(url, d)
} }
export const getList2 = (params,pageData) => { export const getList11 = (params,pageData) => {
let url = `/service/S_CW_QZ_03` let url = `/service/S_CW_QZ_11`
let d = setParamsData(params,pageData) let d = setParamsData(params,pageData)
return http.post(url, d) return http.post(url, d)
} }
export const getList12 = (params,pageData) => {
export const getList4 = (params,pageData) => { let url = `/service/S_CW_QZ_12`
let url = `/service/S_CW_QZ_04`
let d = setParamsData(params,pageData) let d = setParamsData(params,pageData)
return http.post(url, d) return http.post(url, d)
} }
export const getList5 = (params,pageData) => { export const getList13 = (params,pageData) => {
let url = `/service/S_CW_QZ_05` let url = `/service/S_CW_QZ_13`
let d = setParamsData(params,pageData) let d = setParamsData(params,pageData)
return http.post(url, d) return http.post(url, d)
} }
......
...@@ -642,6 +642,17 @@ ...@@ -642,6 +642,17 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
},
{
"path" : "pages/payment-order/edit",
"style" :
{
"navigationBarTitleText" : "付款单详情",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
} }
], ],
"globalStyle": { "globalStyle": {
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
</view> </view>
</view> </view>
<view v-if="!orderInfo.id || orderInfo.status != 2" class="footer-box"> <view v-if="!orderInfo.id || orderInfo.status != 1" class="footer-box">
<button class="cu-btn block bg-blue" @tap="onSubmit(1)">提 交</button> <button class="cu-btn block bg-blue" @tap="onSubmit(1)">提 交</button>
<button v-if="orderInfo.id" class="cu-btn block bg-red" @tap="onSubmit(2)">删 除</button> <button v-if="orderInfo.id" class="cu-btn block bg-red" @tap="onSubmit(2)">删 除</button>
</view> </view>
...@@ -363,8 +363,7 @@ ...@@ -363,8 +363,7 @@
}) })
this.orderInfo = list[0]; this.orderInfo = list[0];
if (this.orderInfo.id) { if (this.orderInfo.id) {
this.factoryIndex = this.factoryList.findIndex(item => item.value === this.orderInfo this.factoryIndex = this.factoryList.findIndex(item => item.value === this.orderInfo.companyCode);
.companyCode);
this.onGetDeviceList(); this.onGetDeviceList();
} }
} }
......
...@@ -144,7 +144,12 @@ ...@@ -144,7 +144,12 @@
//不良品类 //不良品类
form: {}, form: {},
factoryIndex:0, factoryIndex:0,
factoryList:[], factoryList:[
{
label:"全部",
value:''
}
],
floatTop:"", floatTop:"",
floatLeft: "", floatLeft: "",
floatBoxStatus: false, floatBoxStatus: false,
...@@ -217,13 +222,14 @@ ...@@ -217,13 +222,14 @@
}, },
onLoading() { onLoading() {
getParamsList().then(res=>{ getParamsList().then(res=>{
this.factoryList = res.data.map(item=>{ let list = res.data.map(item=>{
this.factoryEnum[item.companyCode] = item.companyName this.factoryEnum[item.companyCode] = item.companyName
return { return {
label: item.companyName, label: item.companyName,
value: item.companyCode value: item.companyCode
} }
}) })
this.factoryList = [...this.factoryList,...list]
this.$forceUpdate(); this.$forceUpdate();
this.onGetList(); this.onGetList();
}) })
......
...@@ -277,7 +277,12 @@ ...@@ -277,7 +277,12 @@
//不良品类 //不良品类
form: {}, form: {},
index: 0, index: 0,
factoryList: [], factoryList: [
{
label: '全部',
value: ''
}
],
innerHeight: window.innerHeight, innerHeight: window.innerHeight,
innerWidth: window.innerWidth, innerWidth: window.innerWidth,
startTimeStamp: 0, startTimeStamp: 0,
...@@ -340,12 +345,13 @@ ...@@ -340,12 +345,13 @@
}, },
onLoading() { onLoading() {
getParamsList().then(res => { getParamsList().then(res => {
this.factoryList = res.data.map(item => { let list = res.data.map(item => {
return { return {
label: item.companyName, label: item.companyName,
value: item.companyCode value: item.companyCode
} }
}) })
this.factoryList = [...this.factoryList,...list];
this.pageData.offset = 0; this.pageData.offset = 0;
this.projectDataList = []; this.projectDataList = [];
this.subList = [] this.subList = []
......
...@@ -206,8 +206,7 @@ ...@@ -206,8 +206,7 @@
title: "加载中..." title: "加载中..."
}) })
save({ save({
...this.orderInfo, ...this.orderInfo
signingDate: moment(this.orderInfo.signingDate).format("YYYYMMDD")
}).then(res => { }).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data.__sys__.status === 0) { if (res.data.__sys__.status === 0) {
......
...@@ -99,17 +99,11 @@ ...@@ -99,17 +99,11 @@
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"> <view class="title">
<text v-if="orderInfo.reviewStatus !=3" class="text-xl text-red">*</text>
<text>扣款日期:</text> <text>扣款日期:</text>
</view> </view>
<view v-if="orderInfo.reviewStatus ==3" class=""> <view class="">
<text>{{orderInfo.totalContractPriceIncluding}}</text> <text>{{orderInfo.signingDate}}</text>
</view>
<view v-else class="text-blue" @tap="onOpenCalendar">
<text>{{orderInfo.signingDate||"请选择日期"}}</text>
<text class="cuIcon-right"></text>
</view> </view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
...@@ -197,8 +191,7 @@ ...@@ -197,8 +191,7 @@
}) })
updateSubmitStatus({ updateSubmitStatus({
...this.orderInfo, ...this.orderInfo,
reviewStatus:3, reviewStatus:3
signingDate: moment(this.orderInfo.signingDate).format("YYYYMMDD")
}).then(res => { }).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data.__sys__.status === 0) { if (res.data.__sys__.status === 0) {
......
...@@ -96,9 +96,13 @@ ...@@ -96,9 +96,13 @@
<text class="text-gray part-2">:</text> <text class="text-gray part-2">:</text>
<text class="text-title">{{submitStatusEnum[item.reviewStatus]}}</text> <text class="text-title">{{submitStatusEnum[item.reviewStatus]}}</text>
</view> </view>
<view class="flex-row">
<text class="text-gray part-1">创建时间</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.createdTime}}</text>
</view>
</view> </view>
</view> </view>
<view v-if="projectDataList.length" style="padding: 12px 6% 0;"> <view v-if="projectDataList.length" style="padding: 12px 6% 0;">
...@@ -223,7 +227,13 @@ ...@@ -223,7 +227,13 @@
},this.pageData).then(res => { },this.pageData).then(res => {
uni.hideLoading(); uni.hideLoading();
let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns) let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns).map(item => {
let createdTime =item.createdTime? item.createdTime.split(''):[];
return {
...item,
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]}` :''
}
})
if (this.pageData.offset == 0) { if (this.pageData.offset == 0) {
this.projectDataList = list this.projectDataList = list
} else { } else {
......
...@@ -150,7 +150,12 @@ ...@@ -150,7 +150,12 @@
//不良品类 //不良品类
form: {}, form: {},
factoryIndex:0, factoryIndex:0,
factoryList:[], factoryList:[
{
label:"全部",
value:''
}
],
floatTop:"", floatTop:"",
floatLeft: "", floatLeft: "",
floatBoxStatus: false, floatBoxStatus: false,
...@@ -245,13 +250,14 @@ ...@@ -245,13 +250,14 @@
}) })
}) })
getParamsList().then(res=>{ getParamsList().then(res=>{
this.factoryList = res.data.map(item=>{ let list = res.data.map(item=>{
this.factoryEnum[item.companyCode] = item.companyName this.factoryEnum[item.companyCode] = item.companyName
return { return {
label: item.companyName, label: item.companyName,
value: item.companyCode value: item.companyCode
} }
}) })
this.factoryList = [...this.factoryList,...list]
this.$forceUpdate(); this.$forceUpdate();
this.onGetUserByCompanyCode(); this.onGetUserByCompanyCode();
}) })
......
...@@ -188,7 +188,12 @@ ...@@ -188,7 +188,12 @@
//不良品类 //不良品类
form: {}, form: {},
index:0, index:0,
factoryList:[], factoryList:[
{
label: '全部',
value: ''
}
],
innerHeight: window.innerHeight, innerHeight: window.innerHeight,
innerWidth: window.innerWidth, innerWidth: window.innerWidth,
startTimeStamp:0, startTimeStamp:0,
...@@ -256,12 +261,13 @@ ...@@ -256,12 +261,13 @@
}, },
onLoading() { onLoading() {
getParamsList().then(res=>{ getParamsList().then(res=>{
this.factoryList = res.data.map(item=>{ let list = res.data.map(item=>{
return { return {
label: item.companyName, label: item.companyName,
value: item.companyCode value: item.companyCode
} }
}) })
this.factoryList = [...this.factoryList,...list];
this.$forceUpdate(); this.$forceUpdate();
this.ongetCount(); this.ongetCount();
this.onGetList(); this.onGetList();
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</view> </view>
</block> </block>
<block slot="content"> <block slot="content">
<text class="text-white">新增结算</text> <text class="text-white">新增付款</text>
</block> </block>
<block slot="right"> <block slot="right">
<view class="margin-right" @tap="onNavToSelect"> <view class="margin-right" @tap="onNavToSelect">
...@@ -22,9 +22,146 @@ ...@@ -22,9 +22,146 @@
<view class="flex-col content-part-1"> <view class="flex-col content-part-1">
<view class="flex-row header"> <view class="flex-row header">
<image src="../../static/icon10.png" mode="widthFix"></image> <image src="../../static/icon10.png" mode="widthFix"></image>
<text class="text-lg text-bold text-black">结算单</text> <text class="text-lg text-bold text-black">{{selectList.length? '可结算清单': '清单详情'}}</text>
</view> </view>
<view class="form-content-box">
<view v-if="selectList && selectList.length" class="form-content-box">
<form v-for="(item,k) in selectList" :key="k" class="form-box">
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>公司名称:</text>
</view>
<view class="text-blue">
<text>{{item.companyName}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>供应商名称:</text>
</view>
<view class="text-blue">
<text>{{item.partyA}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>剩余付款金额:</text>
</view>
<view class="text-blue">
<text>{{Number(item.remainingAmount)}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>来源单号:</text>
</view>
<view class="text-blue">
<text>{{item.settlementNumber}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>票据类型:</text>
</view>
<view class="text-blue">
<text>{{item.billTybe}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>发票号:</text>
</view>
<view class="text-blue">
<text>{{item.billNumber}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>税率(%):</text>
</view>
<view class="text-blue">
<text>{{item.taxPoints}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>不含税金额:</text>
</view>
<view class="text-blue">
<text>{{item.thisSettlementAmount}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>税额:</text>
</view>
<view class="text-blue">
<text>{{item.thisSettlementTax}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>发票总额:</text>
</view>
<view class="text-blue">
<text>{{Number(item.totalContractPriceIncluding)}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>收票日期:</text>
</view>
<view class="text-blue">
<text>{{item.receiveDate}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>本次付款金额:</text>
</view>
<u-input v-model="item.thisAmount"
color="#0081ff" inputAlign="right" type="number" :border="border"
placeholder="请输入付款金额" />
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>付款日期:</text>
</view>
<view class="text-blue" @tap="onOpenCalendar(k)">
<text>{{item.signingDate||"请选择日期"}}</text>
<text class="cuIcon-right"></text>
</view>
</view>
</form>
</view>
<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">
...@@ -42,9 +179,6 @@ ...@@ -42,9 +179,6 @@
</picker> </picker>
</view> </view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"> <view class="title">
<text class="text-xl text-red">*</text> <text class="text-xl text-red">*</text>
...@@ -89,7 +223,8 @@ ...@@ -89,7 +223,8 @@
getDict getDict
} from "@/api/index.js" } from "@/api/index.js"
import { import {
save save,
saveBySelect
} from "@/api/payment-order.js"; } from "@/api/payment-order.js";
import { import {
getParamsList getParamsList
...@@ -111,7 +246,9 @@ ...@@ -111,7 +246,9 @@
contractDate: moment().format("YYYY-MM-DD") contractDate: moment().format("YYYY-MM-DD")
}, },
factoryList: [], factoryList: [],
factoryIndex: -1 factoryIndex: -1,
selectList:[],
editIndex:''
}; };
}, },
onLoad() { onLoad() {
...@@ -135,11 +272,22 @@ ...@@ -135,11 +272,22 @@
this.factoryIndex = index; this.factoryIndex = index;
}, },
onNavToSelect() { onNavToSelect() {
let checkedId = '';
if(this.selectList.length){
checkedId = this.selectList.map(item => item.id).join();
}
uni.navigateTo({ uni.navigateTo({
url: `/pages/payment-order/index`, url: `/pages/payment-order/index?checkedId=${checkedId}`,
events: {
acceptDataFromOpenedPage: (data) => {
this.selectList = data.data;
this.$forceUpdate();
}
}
}) })
}, },
onOpenCalendar(){ onOpenCalendar(val){
this.editIndex = val;
this.show2 = true; this.show2 = true;
}, },
onSubmit() { onSubmit() {
...@@ -150,7 +298,12 @@ ...@@ -150,7 +298,12 @@
this.show2 = false; this.show2 = false;
}, },
onConfirm(e) { onConfirm(e) {
this.orderInfo.signingDate = e[0]; if(this.selectList.length){
this.selectList[this.editIndex].signingDate = e[0];
}else{
this.orderInfo.signingDate = e[0];
}
this.onCancel(); this.onCancel();
}, },
onSave() { onSave() {
...@@ -158,22 +311,49 @@ ...@@ -158,22 +311,49 @@
uni.showLoading({ uni.showLoading({
title: "加载中..." title: "加载中..."
}) })
save({ if(this.selectList && this.selectList.length){
...this.orderInfo, let list = this.selectList.map(item => {
companyName: this.factoryList[this.factoryIndex].label, return {
companyCode: this.factoryList[this.factoryIndex].value ...item,
}).then(res => { receiveDate: moment(this.orderInfo.receiveDate).format("YYYYMMDD")
uni.hideLoading(); }
if (res.data.__sys__.status === 0) { })
uni.showToast({ saveBySelect(list,{
icon: "success", hiddenConditions:'1',
title: "新增成功" billState: '1',
}) mainId: this.selectList.length && this.selectList[0].mainId? this.selectList[0].mainId : ''
setTimeout(() => { }).then(res => {
this.onBack(); uni.hideLoading();
}, 1500) if (res.data.__sys__.status === 0) {
} uni.showToast({
}) icon: "success",
title: "新增成功"
})
setTimeout(() => {
this.onBack();
}, 1500)
}
})
}else{
save({
...this.orderInfo,
companyName: this.factoryList[this.factoryIndex].label,
companyCode: this.factoryList[this.factoryIndex].value,
signingDate: moment(this.orderInfo.signingDate).format("YYYYMMDD")
}).then(res => {
uni.hideLoading();
if (res.data.__sys__.status === 0) {
uni.showToast({
icon: "success",
title: "新增成功"
})
setTimeout(() => {
this.onBack();
}, 1500)
}
})
}
}, },
onChange(e) { onChange(e) {
let index = Number(e.target.value); let index = Number(e.target.value);
...@@ -402,12 +582,15 @@ ...@@ -402,12 +582,15 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
padding: 12upx 0;
border-radius: 4upx; border-radius: 4upx;
margin-bottom: 120upx;
// box-shadow: 0 0 8upx rgba(0, 0, 0, 0.34); // box-shadow: 0 0 8upx rgba(0, 0, 0, 0.34);
background-color: #ffffff;
.form-box{
margin: 0 0 40upx;
background-color: #ffffff;
}
.cu-form-group { .cu-form-group {
height: 32px; height: 32px;
...@@ -416,7 +599,7 @@ ...@@ -416,7 +599,7 @@
.title { .title {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: 200upx; width: 260upx;
align-items: center; align-items: center;
} }
......
...@@ -23,14 +23,6 @@ ...@@ -23,14 +23,6 @@
<form> <form>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"> <view class="title">
<text>项目名称:</text>
</view>
<view class="">
<text>{{orderInfo.projName}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>公司名称:</text> <text>公司名称:</text>
</view> </view>
<view class=""> <view class="">
...@@ -39,15 +31,7 @@ ...@@ -39,15 +31,7 @@
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"> <view class="title">
<text>主合同名称:</text> <text>来源单号:</text>
</view>
<view class="">
<text>{{orderInfo.contractName}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>主合同号:</text>
</view> </view>
<view class=""> <view class="">
<text>{{orderInfo.contractNumber}}</text> <text>{{orderInfo.contractNumber}}</text>
...@@ -55,71 +39,36 @@ ...@@ -55,71 +39,36 @@
</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>{{orderInfo.projCode}}</text> <text>{{orderInfo.incomeNumber}}</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>{{orderInfo.settlementNumber}}</text> <text>{{Number(orderInfo.totalContractPriceIncluding) || 0}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>结算类别:</text>
</view>
<view class="">
<text>{{settlementTypeEnum[orderInfo.settlementType]}}</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>{{orderInfo.thisSettlementAmount}}</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>{{orderInfo.thisSettlementTax}}</text> <text>{{cancelStatusEnum[orderInfo.cancelStatus]}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>结算含税额:</text>
</view>
<view class="">
<text>{{orderInfo.thisPriceTax}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text v-if="orderInfo.reviewStatus !=3" class="text-xl text-red">*</text>
<text>结算日期:</text>
</view>
<view v-if="orderInfo.reviewStatus ==3" class="">
<text>{{orderInfo.contractDate}}</text>
</view>
<view v-else class="text-blue" @tap="onOpenCalendar">
<text>{{orderInfo.contractDate||"请选择日期"}}</text>
<text class="cuIcon-right"></text>
</view> </view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
...@@ -127,13 +76,64 @@ ...@@ -127,13 +76,64 @@
<text>审批状态:</text> <text>审批状态:</text>
</view> </view>
<view class=""> <view class="">
<text>{{submitStatusEnum[orderInfo.reviewStatus]}}</text> <text>{{reviewStatusEnum[orderInfo.reviewStatus]}}</text>
</view> </view>
</view> </view>
</form> </form>
</view> </view>
</view> </view>
<view class="flex-col content-part-1 content-part-2">
<view class="flex-row header">
<text class="text-lg text-bold text-black">清单明细</text>
</view>
<view class="form-content-box margin-bottom">
<view v-for="(item,i) in subList" :key="i" class="sub-item-box">
<form class="item-form">
<view class="cu-form-group">
<view class="title">
<text>公司名称:</text>
</view>
<view class="">
<text>{{item.companyName}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>供应商名称:</text>
</view>
<view class="">
<text>{{item.partyA}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>来源单号:</text>
</view>
<view class="">
<text>{{item.contractNumber}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>收款总额:</text>
</view>
<view class="">
<text>{{item.totalContractPriceIncluding}}</text>
</view>
</view>
</form>
</view>
</view>
<view v-if="subList.length <= 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120">
</u-empty>
</view>
</view>
<view v-if="orderInfo.reviewStatus && orderInfo.reviewStatus!=3" class="footer-box"> <view v-if="orderInfo.reviewStatus && orderInfo.reviewStatus!=3" class="footer-box">
<button class="cu-btn block bg-blue" @tap="onSubmit(1)">提交</button> <button class="cu-btn block bg-blue" @tap="onSubmit(1)">提交</button>
</view> </view>
...@@ -145,6 +145,7 @@ ...@@ -145,6 +145,7 @@
</template> </template>
<script> <script>
import { getDict } from '@/api/index.js';
import { import {
toJsonData toJsonData
} from "@/utils/tools.js"; } from "@/utils/tools.js";
...@@ -152,7 +153,7 @@ ...@@ -152,7 +153,7 @@
import { import {
getParamsData getParamsData
} from "@/api/product-warehousing.js"; } from "@/api/product-warehousing.js";
import { getList } from "@/api/settlement-doc.js"; import { getList,getSubList } from "@/api/payment-order.js";
export default { export default {
data() { data() {
...@@ -175,7 +176,10 @@ ...@@ -175,7 +176,10 @@
settlementTypeEnum:{ settlementTypeEnum:{
1:'部分结算', 1:'部分结算',
2:'最终结算' 2:'最终结算'
} },
reviewStatusEnum:{},
cancelStatusEnum:{},
subList:[]
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -226,11 +230,34 @@ ...@@ -226,11 +230,34 @@
}, },
onBack() { onBack() {
uni.redirectTo({ uni.redirectTo({
url:'/pages/settlement-doc/list' url:'/pages/payment-order/list'
}) })
}, },
onLoading() { onLoading() {
this.onGetList();
getDict({
codeset:"hggp.cw.cancelStatus"
}).then(res=>{
if(res.data.list && res.data.list.length){
res.data.list.forEach(item=>{
this.cancelStatusEnum[item.value] = item.label;
})
}
})
getDict({
codeset:"hggp.cw.reviewStatus"
}).then(res=>{
if(res.data.list && res.data.list.length){
res.data.list.forEach(item=>{
this.reviewStatusEnum[item.value] = item.label;
})
}
this.onGetList();
})
}, },
onGetList() { onGetList() {
uni.showLoading({ uni.showLoading({
...@@ -247,9 +274,26 @@ ...@@ -247,9 +274,26 @@
...list[0], ...list[0],
signingDate: moment(list[0].signingDate).format("YYYY-MM-DD") signingDate: moment(list[0].signingDate).format("YYYY-MM-DD")
} }
this.onGetSubList()
} }
}) })
},
onGetSubList() {
uni.showLoading({
title: "加载中"
})
getSubList({
mainId: this.id
}).then(res => {
uni.hideLoading()
let list = toJsonData(res.data.__blocks__.result.rows, res.data.__blocks__.result.meta
.columns);
if (list && list.length) {
this.subList = list
}
})
} }
} }
} }
...@@ -578,9 +622,11 @@ ...@@ -578,9 +622,11 @@
.content-part-2 { .content-part-2 {
.form-content-box { .form-content-box {
display: flex; display: flex;
flex-direction: column;
align-items: center;
background-color: transparent; background-color: transparent;
justify-content: center; justify-content: center;
margin-bottom: 100upx;
} }
} }
...@@ -590,7 +636,7 @@ ...@@ -590,7 +636,7 @@
border-radius: 12upx; border-radius: 12upx;
background-color: #ffffff; background-color: #ffffff;
box-shadow: 0 4upx 6upx rgba(0, 0, 0, 0.34); box-shadow: 0 4upx 6upx rgba(0, 0, 0, 0.34);
margin-bottom: 120upx; margin-bottom: 32upx;
} }
.form-item-label { .form-item-label {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</view> </view>
</block> </block>
<block slot="content"> <block slot="content">
<text class="text-white">选择合同</text> <text class="text-white">选择采购收票</text>
</block> </block>
<block slot="right"> <block slot="right">
<text class="text-white text-bold text-lg margin-right" @tap="onCheck">确 定</text> <text class="text-white text-bold text-lg margin-right" @tap="onCheck">确 定</text>
...@@ -19,43 +19,62 @@ ...@@ -19,43 +19,62 @@
<view class="flex-col data-content" > <view class="flex-col data-content" >
<view class="flex-col part-3"> <view class="flex-col part-3">
<view v-for="(item,k) in projectDataList" :key="k" class="content-item" @tap="onSelect(k)"> <view v-for="(item,k) in projectDataList" :key="k" class="content-item" @tap="onSelect(k)">
<view class="flex-col content-box" :class="k === current?'active':''"> <view class="flex-col content-box" :class="current.includes(k)?'active':''">
<view class="flex-row"> <view class="flex-row">
<text class="text-gray part-1">甲方名称</text> <text class="text-gray part-1">公司名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title ellipsis">{{item.companyName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">供应商名称</text>
<text class="text-gray part-2">:</text> <text class="text-gray part-2">:</text>
<text class="text-title ellipsis">{{item.partyA}}</text> <text class="text-title ellipsis">{{item.partyA}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">剩余付款金额</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{Number(item.remainingAmount)}}</text>
</view> </view>
<view class="flex-row"> <view class="flex-row">
<text class="text-gray part-1">主合同名称</text> <text class="text-gray part-1">来源单号</text>
<text class="text-gray part-2">:</text> <text class="text-gray part-2">:</text>
<text class="text-title ellipsis">{{item.contractName}}</text> <text class="text-title">{{item.settlementNumber}}</text>
</view> </view>
<view class="flex-row"> <view class="flex-row">
<text class="text-gray part-1">合同类型</text> <text class="text-gray part-1">票据类型</text>
<text class="text-gray part-2">:</text> <text class="text-gray part-2">:</text>
<text class="text-title">{{contractTypeEnum[item.contractType]}}</text> <text class="text-title ellipsis">{{billTybeEnum[item.billTybe]}}</text>
</view> </view>
<view class="flex-row"> <view class="flex-row">
<text class="text-gray part-1">主合同</text> <text class="text-gray part-1">发票</text>
<text class="text-gray part-2">:</text> <text class="text-gray part-2">:</text>
<text class="text-title">{{item.contractNumber}}</text> <text class="text-title ellipsis">{{item.billNumber}}</text>
</view> </view>
<view class="flex-row"> <view class="flex-row">
<text class="text-gray part-1">项目编号</text> <text class="text-gray part-1">税率(%)</text>
<text class="text-gray part-2">:</text> <text class="text-gray part-2">:</text>
<text class="text-title">{{item.projCode}}</text> <text class="text-title ellipsis">{{Number(item.taxPoints)}}</text>
</view> </view>
<view class="flex-row"> <view class="flex-row">
<text class="text-gray part-1">乙方名称</text> <text class="text-gray part-1">不含税金额</text>
<text class="text-gray part-2">:</text> <text class="text-gray part-2">:</text>
<text class="text-title ellipsis">{{item.partyB}}</text> <text class="text-title ellipsis">{{Number(item.thisSettlementAmount)}}</text>
</view> </view>
<view class="flex-row"> <view class="flex-row">
<text class="text-gray part-1">合同总价</text> <text class="text-gray part-1">税额</text>
<text class="text-gray part-2">:</text>
<text class="text-title ellipsis">{{Number(item.thisSettlementTax)}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">发票总额</text>
<text class="text-gray part-2">:</text> <text class="text-gray part-2">:</text>
<text class="text-title ellipsis">{{Number(item.totalContractPriceIncluding)}}</text> <text class="text-title ellipsis">{{Number(item.totalContractPriceIncluding)}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">收票日期</text>
<text class="text-gray part-2">:</text>
<text class="text-title ellipsis">{{item.receiveDate}}</text>
</view> </view>
</view> </view>
...@@ -67,8 +86,8 @@ ...@@ -67,8 +86,8 @@
<script> <script>
import {toJsonData} from "@/utils/tools.js"; import {toJsonData} from "@/utils/tools.js";
import { getProList } from "@/api/settlement-doc.js"; import { getProList } from "@/api/payment-order.js";
import {getDict} from "@/api/index.js" import moment from "@/common/moment";
export default { export default {
...@@ -80,16 +99,25 @@ ...@@ -80,16 +99,25 @@
loadingText: '努力加载中', loadingText: '努力加载中',
loadmoreText: '上划加载', loadmoreText: '上划加载',
nomoreText: '到底啦', nomoreText: '到底啦',
queryData: {}, queryData: {
hiddenConditions: "1",
billState: '1'
},
pageData:{ pageData:{
showCount: "true", showCount: "true",
limit:5, limit:500,
offset:0 offset:0
}, },
current:0, current:[],
checkedId:[],
eventChannel: null, eventChannel: null,
contractTypeEnum:{}, contractTypeEnum:{},
contractNumber:'' contractNumber:'',
billTybeEnum:{
1: '增值税专用发票',
0: '普通电子发票'
},
mainId:''
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -98,6 +126,12 @@ ...@@ -98,6 +126,12 @@
}else{ }else{
this.contractNumber = '' this.contractNumber = ''
} }
if(option && option.mainId){
this.mainId = option.mainId;
}
if(option && option.checkedId){
this.checkedId = option.checkedId.split(",")
}
this.eventChannel = this.getOpenerEventChannel(); this.eventChannel = this.getOpenerEventChannel();
this.onLoading(); this.onLoading();
}, },
...@@ -109,30 +143,34 @@ ...@@ -109,30 +143,34 @@
}, },
methods: { methods: {
onCheck(){ onCheck(){
this.eventChannel.emit('acceptDataFromOpenedPage', {
...this.projectDataList[this.current], if(this.current && this.current.length){
totalContractPrice: this.projectDataList[this.current].totalContractPriceExcluding let list = this.current.map(val => {
} ); return {
...this.projectDataList[val],
billId: this.projectDataList[val].id,
mainId: this.mainId
}
})
this.eventChannel.emit('acceptDataFromOpenedPage', {data:list});
}
this.onBack(); this.onBack();
}, },
onSelect(k){ onSelect(k){
this.current = k; if(this.current.includes(k)){
this.current = this.current.filter(item => item !== k)
} else {
this.current.push(k)
}
}, },
onBack(){ onBack(){
uni.navigateBack(); uni.navigateBack();
}, },
onLoading() { onLoading() {
getDict({
codeset:'hggp.cw.contractType'
}).then(res=>{
console.log(res,9999)
if(res.data.list && res.data.list.length){
res.data.list.forEach(item=>{
this.contractTypeEnum[item.value] = item.label
})
}
})
this.onGetList(); this.onGetList();
}, },
onGetList() { onGetList() {
...@@ -144,12 +182,25 @@ ...@@ -144,12 +182,25 @@
},this.pageData).then(res => { },this.pageData).then(res => {
uni.hideLoading(); uni.hideLoading();
let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns) let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns).map(item=>{
return {
...item,
signingDate: moment(item.signingDate).format("YYYY-MM-DD"),
receiveDate: moment(item.receiveDate).format("YYYY-MM-DD")
}
})
if(this.contractNumber){ if(this.contractNumber){
list = list.filter(item=>item.contractNumber != this.contractNumber); list = list.filter(item=>item.contractNumber != this.contractNumber);
} }
if (this.pageData.offset == 0) { if (this.pageData.offset == 0) {
this.projectDataList = list this.projectDataList = list;
if(this.checkedId && this.checkedId.length){
this.current = this.checkedId.map(item => {
return this.projectDataList.findIndex(val => val.id === item)
})
}
} else { } else {
this.projectDataList = [...this.projectDataList, ...list] this.projectDataList = [...this.projectDataList, ...list]
} }
...@@ -297,7 +348,7 @@ ...@@ -297,7 +348,7 @@
.flex-row{ .flex-row{
margin: 6upx 0; margin: 6upx 0;
.part-1{ .part-1{
width: 140upx; width: 180upx;
text-align-last: justify; text-align-last: justify;
} }
.part-2{ .part-2{
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<view class="header-title" @tap="onNavToOrderInfo(item)"> <view class="header-title" @tap="onNavToOrderInfo(item)">
<image src="../../static/icon5.png" mode="widthFix"></image> <image src="../../static/icon5.png" mode="widthFix"></image>
<view class="flex-between"> <view class="flex-between">
<text class="text-black text-bold ellipsis">{{item.partyA}}</text> <text class="text-black text-bold ellipsis">{{item.partyA.length>=2 ? item.partyA : item.companyName}}</text>
<view class="margin-right text-blue"> <view class="margin-right text-blue">
<text class="">详情</text> <text class="">详情</text>
<text class="cuIcon-right"></text> <text class="cuIcon-right"></text>
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
}, },
onNavToOrderInfo(val){ onNavToOrderInfo(val){
uni.navigateTo({ uni.navigateTo({
url:`/pages/settlement-doc/edit?id=${val.id}` url:`/pages/payment-order/edit?id=${val.id}`
}) })
} }
} }
......
...@@ -142,7 +142,12 @@ ...@@ -142,7 +142,12 @@
//不良品类 //不良品类
form: {}, form: {},
factoryIndex:0, factoryIndex:0,
factoryList:[], factoryList:[
{
label: '全部',
value: ''
}
],
floatTop:"", floatTop:"",
floatLeft: "", floatLeft: "",
floatBoxStatus: false, floatBoxStatus: false,
...@@ -192,13 +197,14 @@ ...@@ -192,13 +197,14 @@
}, },
onLoading() { onLoading() {
getParamsList().then(res=>{ getParamsList().then(res=>{
this.factoryList = res.data.map(item=>{ let list = res.data.map(item=>{
this.factoryEnum[item.companyCode] = item.companyName this.factoryEnum[item.companyCode] = item.companyName
return { return {
label: item.companyName, label: item.companyName,
value: item.companyCode value: item.companyCode
} }
}) })
this.factoryList = [...this.factoryList,...list];
this.$forceUpdate(); this.$forceUpdate();
this.onGetList(); this.onGetList();
}) })
......
...@@ -398,9 +398,13 @@ ...@@ -398,9 +398,13 @@
}, },
onNavToSelectList(val) { onNavToSelectList(val) {
console.log(val) console.log(val)
let ids = this.formList.map(item=>item.id); let ids = ''
if(this.formList.length){
ids = this.formList.filter(item => Number(item.selectIndex) === val).map(item=> item.id).join();
}
uni.navigateTo({ uni.navigateTo({
url: `/pages/settlement-doc/select-list?selectIndex=${val}&contractNumber=${this.orderInfo.contractNumber}&contractType=${this.orderInfo.contractType}`, url: `/pages/settlement-doc/select-list?selectIndex=${val}&contractNumber=${this.orderInfo.contractNumber}&contractType=${this.orderInfo.contractType}&ids=${ids}`,
events: { events: {
acceptDataFromOpenedPage2: (data) => { acceptDataFromOpenedPage2: (data) => {
console.log(data) console.log(data)
...@@ -424,7 +428,7 @@ ...@@ -424,7 +428,7 @@
this.orderInfo.cumulativeSettlementAmount = num;//累计结算金额 this.orderInfo.cumulativeSettlementAmount = num;//累计结算金额
if(this.taxPointsIndex>=0){ if(this.taxPointsIndex>=0){
this.orderInfo.thisPriceTax = num*(1+Number(this.taxPointsList[this.taxPointsIndex].label)/100); //含税金额 this.orderInfo.thisPriceTax =(num*(1+Number(this.taxPointsList[this.taxPointsIndex].label)/100)).toFixed(2); //含税金额
this.orderInfo.cumulativePriceTax = this.orderInfo.thisPriceTax; // 累计含税金额 this.orderInfo.cumulativePriceTax = this.orderInfo.thisPriceTax; // 累计含税金额
this.orderInfo.thisSettlementTax = this.orderInfo.thisPriceTax - num; // 税额 this.orderInfo.thisSettlementTax = this.orderInfo.thisPriceTax - num; // 税额
this.orderInfo.cumulativeSettlementTax = this.orderInfo.thisSettlementTax; // 累计税额 this.orderInfo.cumulativeSettlementTax = this.orderInfo.thisSettlementTax; // 累计税额
...@@ -492,6 +496,7 @@ ...@@ -492,6 +496,7 @@
...that.orderInfo, ...that.orderInfo,
...data ...data
} }
that.formList = [];
console.log(that.orderInfo, 9999) console.log(that.orderInfo, 9999)
that.$forceUpdate(); that.$forceUpdate();
} }
...@@ -555,6 +560,14 @@ ...@@ -555,6 +560,14 @@
uni.showLoading({ uni.showLoading({
title: "加载中..." title: "加载中..."
}) })
let formList = this.formList.map(item =>{
return {
...item,
unitPrice: item.unitPrice.toString(),
totalPrice: item.totalPrice.toString()
}
})
save({ save({
projCode: this.orderInfo.projCode, projCode: this.orderInfo.projCode,
projName: this.orderInfo.projName, projName: this.orderInfo.projName,
...@@ -565,15 +578,15 @@ ...@@ -565,15 +578,15 @@
taxPoints:this.taxPointsList[this.taxPointsIndex].value, taxPoints:this.taxPointsList[this.taxPointsIndex].value,
priceTaxSeparation:this.priceTaxSeparationList[this.priceTaxSeparationIndex].value, priceTaxSeparation:this.priceTaxSeparationList[this.priceTaxSeparationIndex].value,
contractDate:this.orderInfo.contractDate, contractDate:this.orderInfo.contractDate,
thisSettlementAmount:this.orderInfo.thisSettlementAmount, thisSettlementAmount:this.orderInfo.thisSettlementAmount.toString(),
thisSettlementTax:this.orderInfo.thisSettlementTax, thisSettlementTax:this.orderInfo.thisSettlementTax.toString(),
thisPriceTax:this.orderInfo.thisPriceTax, thisPriceTax:this.orderInfo.thisPriceTax.toString(),
totalContractPrice:this.orderInfo.totalContractPrice, totalContractPrice:this.orderInfo.totalContractPrice,
cumulativeSettlementAmount:this.orderInfo.cumulativeSettlementAmount, cumulativeSettlementAmount:this.orderInfo.cumulativeSettlementAmount.toString(),
cumulativeSettlementTax:this.orderInfo.cumulativeSettlementTax, cumulativeSettlementTax:this.orderInfo.cumulativeSettlementTax.toString(),
cumulativePriceTax:this.orderInfo.cumulativePriceTax, cumulativePriceTax:this.orderInfo.cumulativePriceTax.toString(),
},this.formList).then(res => { },).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data.__sys__.status === 0) { if (res.data.__sys__.status === 0) {
uni.showToast({ uni.showToast({
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
<script> <script>
import {toJsonData} from "@/utils/tools.js"; import {toJsonData} from "@/utils/tools.js";
import { getList1,getList2,getList3,getList4,getList5 } from "@/api/settlement-doc.js"; import { getList1,getList3,getList11,getList12,getList13 } from "@/api/settlement-doc.js";
import {getDict} from "@/api/index.js" import {getDict} from "@/api/index.js"
...@@ -183,7 +183,8 @@ ...@@ -183,7 +183,8 @@
1:"合同清单", 1:"合同清单",
2:"扣款单", 2:"扣款单",
3:"签证单" 3:"签证单"
} },
ids:''
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -196,6 +197,10 @@ ...@@ -196,6 +197,10 @@
if(option && option.contractType){ if(option && option.contractType){
this.contractType = option.contractType this.contractType = option.contractType
} }
if(option && option.ids){
this.ids = option.ids
console.log(this.ids)
}
this.eventChannel = this.getOpenerEventChannel(); this.eventChannel = this.getOpenerEventChannel();
this.onLoading(); this.onLoading();
...@@ -212,13 +217,14 @@ ...@@ -212,13 +217,14 @@
let thisEngineeringQuantity = this.projectDataList[this.current].provisionalQuantity || 1 let thisEngineeringQuantity = this.projectDataList[this.current].provisionalQuantity || 1
this.eventChannel.emit('acceptDataFromOpenedPage2', { this.eventChannel.emit('acceptDataFromOpenedPage2', {
id: this.projectDataList[this.current].id,
settlementBasis:this.selectTypeEnum[this.selectIndex], settlementBasis:this.selectTypeEnum[this.selectIndex],
taskName:'', taskName:'',
engineeringContent:"", engineeringContent:"",
thisEngineeringQuantity, thisEngineeringQuantity,
cumulativeEngineeringQuantity:'', cumulativeEngineeringQuantity:'',
unit:"", unit:"",
unitPrice, unitPrice:Number(unitPrice),
totalPrice: Number(thisEngineeringQuantity)* Number(unitPrice), totalPrice: Number(thisEngineeringQuantity)* Number(unitPrice),
selectIndex: this.selectIndex selectIndex: this.selectIndex
} ); } );
...@@ -241,16 +247,16 @@ ...@@ -241,16 +247,16 @@
} }
if(this.selectIndex ==1){ if(this.selectIndex ==1){
if(this.contractType ==2){ if(this.contractType ==2){
this.onGetList4() this.onGetList11()
}else{ }else{
this.onGetList(); this.onGetList1();
} }
}else if(this.selectIndex ==2){ }else if(this.selectIndex ==2){
this.onGetList2(); this.onGetList12();
}else if(this.selectIndex ==3){ }else if(this.selectIndex ==3){
if(this.contractType ==2){ if(this.contractType ==2){
this.onGetList5(); this.onGetList13();
}else{ }else{
this.onGetList3(); this.onGetList3();
} }
...@@ -258,58 +264,63 @@ ...@@ -258,58 +264,63 @@
} }
}) })
}, },
onGetList() { onGetList1() {
uni.showLoading({ uni.showLoading({
title: "加载中" title: "加载中"
}) })
getList1({ getList1({
...this.queryData ...this.queryData,
inventoryIds: this.ids
},this.pageData).then(res => { },this.pageData).then(res => {
uni.hideLoading(); uni.hideLoading();
this.projectDataList= toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns); this.projectDataList = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns);
console.log(this.projectDataList) console.log(this.projectDataList)
}) })
}, },
onGetList2() { onGetList3() {
uni.showLoading({ uni.showLoading({
title: "加载中" title: "加载中"
}) })
getList2({ getList3({
...this.queryData ...this.queryData,
appentIds: this.ids
},this.pageData).then(res => { },this.pageData).then(res => {
uni.hideLoading(); uni.hideLoading();
this.projectDataList = toJsonData(res.data.__blocks__.result2.rows,res.data.__blocks__.result2.meta.columns) this.projectDataList = toJsonData(res.data.__blocks__.result3.rows,res.data.__blocks__.result3.meta.columns)
}) })
}, },
onGetList3() { onGetList12() {
uni.showLoading({ uni.showLoading({
title: "加载中" title: "加载中"
}) })
getList3({ getList12({
...this.queryData ...this.queryData,
deductionIds: this.ids
},this.pageData).then(res => { },this.pageData).then(res => {
uni.hideLoading(); uni.hideLoading();
this.projectDataList = toJsonData(res.data.__blocks__.result3.rows,res.data.__blocks__.result3.meta.columns) this.projectDataList = toJsonData(res.data.__blocks__.result2.rows,res.data.__blocks__.result2.meta.columns)
}) })
}, },
onGetList4() { onGetList11() {
uni.showLoading({ uni.showLoading({
title: "加载中" title: "加载中"
}) })
getList4({ getList11({
...this.queryData ...this.queryData,
inventoryIds: this.ids
},this.pageData).then(res => { },this.pageData).then(res => {
uni.hideLoading(); uni.hideLoading();
this.projectDataList = toJsonData(res.data.__blocks__.result1.rows,res.data.__blocks__.result1.meta.columns) this.projectDataList = toJsonData(res.data.__blocks__.result1.rows,res.data.__blocks__.result1.meta.columns)
}) })
}, },
onGetList5() { onGetList13() {
uni.showLoading({ uni.showLoading({
title: "加载中" title: "加载中"
}) })
getList5({ getList13({
...this.queryData ...this.queryData,
appentIds: this.ids
},this.pageData).then(res => { },this.pageData).then(res => {
uni.hideLoading(); uni.hideLoading();
this.projectDataList = toJsonData(res.data.__blocks__.result3.rows,res.data.__blocks__.result3.meta.columns) this.projectDataList = toJsonData(res.data.__blocks__.result3.rows,res.data.__blocks__.result3.meta.columns)
......
...@@ -240,7 +240,12 @@ ...@@ -240,7 +240,12 @@
//不良品类 //不良品类
form: {}, form: {},
index: 0, index: 0,
factoryList: [], factoryList: [
{
label: '全部',
value: ''
}
],
innerHeight: window.innerHeight, innerHeight: window.innerHeight,
innerWidth: window.innerWidth, innerWidth: window.innerWidth,
startTimeStamp: 0, startTimeStamp: 0,
...@@ -303,12 +308,13 @@ ...@@ -303,12 +308,13 @@
}, },
onLoading() { onLoading() {
getParamsList().then(res => { getParamsList().then(res => {
this.factoryList = res.data.map(item => { let list = res.data.map(item => {
return { return {
label: item.companyName, label: item.companyName,
value: item.companyCode value: item.companyCode
} }
}) })
this.factoryList = [...this.factoryList,...list];
this.pageData.offset = 0; this.pageData.offset = 0;
this.projectDataList = []; this.projectDataList = [];
this.subList = [] this.subList = []
......
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