Commit 7a2d1276 by zhangzhen

功能完善

parent dced34e1
......@@ -609,6 +609,39 @@
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/payment-order/list",
"style" :
{
"navigationBarTitleText" : "付款单管理",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/payment-order/add",
"style" :
{
"navigationBarTitleText" : "新增付款单",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/payment-order/index",
"style" :
{
"navigationBarTitleText" : "选择采购收票",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
}
],
"globalStyle": {
......
......@@ -177,7 +177,7 @@
<text>{{Number(item.invWeight) || 0 }}</text>
</view>
</view>
<view class="cu-form-group">
<!-- <view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>单价:</text>
......@@ -195,7 +195,7 @@
<view class="">
<text>{{Number(item.amount) || 0 }}</text>
</view>
</view>
</view> -->
</form>
......
......@@ -164,7 +164,7 @@
<text>{{Number(subListObj.invWeight) || 0 }}</text>
</view>
</view>
<view class="cu-form-group">
<!-- <view class="cu-form-group">
<view class="title">
<text v-if="orderInfo.submitStatus=='0'" class="text-xl text-red">*</text>
<text>单价:</text>
......@@ -183,7 +183,7 @@
<view class="">
<text>{{Number(subListObj.amount) || 0 }}</text>
</view>
</view>
</view> -->
</form>
</view>
......
......@@ -206,7 +206,7 @@
<text>{{Number(item.invWeight) || 0 }}</text>
</view>
</view>
<view class="cu-form-group">
<!-- <view class="cu-form-group">
<view class="title">
<text>单价:</text>
</view>
......@@ -221,7 +221,7 @@
<view class="">
<text>{{Number(item.amount) || 0 }}</text>
</view>
</view>
</view> -->
</form>
</view>
......
<template>
<view>
<cu-custom bgColor="bg-blue" :isBack="true">
<block slot="backText">
<view class="list-icon" @tap="onBack">
<text class="cuIcon-back text-white text-bold text-xl"></text>
</view>
</block>
<block slot="content">
<text class="text-white">新增结算单</text>
</block>
<block slot="right">
<view class="margin-right" @tap="onNavToSelect">
<text class="text-white">选择采购收票</text>
</view>
</block>
</cu-custom>
<view v-if="statusBarHeight>0" class="content-black" :style="{height:statusBarHeight+45+'px'}">
</view>
<view class="flex-col content-part-1">
<view class="flex-row header">
<image src="../../static/icon10.png" mode="widthFix"></image>
<text class="text-lg text-bold text-black">结算单</text>
</view>
<view class="form-content-box">
<form>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>公司名称:</text>
</view>
<view class="text-blue">
<picker @change="onFactoryChange" :value="factoryIndex" :range="factoryList"
range-key="label">
<view class="uni-input">
<text
class="text-blue">{{ factoryIndex >=0 ? factoryList[factoryIndex].label:'请选择'}}</text>
<text class="cuIcon-right"></text>
</view>
</picker>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>付款总额:</text>
</view>
<u-input v-model="orderInfo.totalContractPriceIncluding"
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">
<text>{{orderInfo.signingDate||"请选择日期"}}</text>
<text class="cuIcon-right"></text>
</view>
</view>
</form>
</view>
</view>
<view class="footer-box">
<button class="cu-btn block bg-blue" @tap="onSubmit">提交</button>
</view>
<u-calendar :show="show2" mode="single" :defaultDate="orderInfo.signingDate" :minDate="minDate" :monthNum='4'
@confirm="onConfirm" @close="onCancel"></u-calendar>
<u-modal :show="show" title="提示" :content='content' :showCancelButton="true" @confirm="onSave"
@cancel="onCancel" :asyncClose="true"></u-modal>
</view>
</template>
<script>
import {
toJsonData
} from "@/utils/tools.js";
import moment from "@/common/moment.js";
import {
getDict
} from "@/api/index.js"
import {
save
} from "@/api/payment-order.js";
import {
getParamsList
} from "@/api/product-warehousing.js";
export default {
data() {
return {
border: 'none',
show: false,
show2: false,
minDate: moment().subtract(2, 'M').format("YYYY-MM-DD"),
content: "请确认是否进行新增付款单?",
statusBarHeight: uni.getStorageSync("statusHeight") || 0,
orderInfo: {
signingDate: '',
totalContractPriceIncluding: '',
reviewStatus: '3',
contractDate: moment().format("YYYY-MM-DD")
},
factoryList: [],
factoryIndex: -1
};
},
onLoad() {
this.onLoading();
},
methods: {
onLoading() {
getParamsList().then(res => {
this.factoryList = res.data.map(item => {
return {
label: item.companyName,
value: item.companyCode
}
})
})
},
onFactoryChange(e) {
let index = Number(e.target.value)
if (this.factoryIndex === index) return;
this.factoryIndex = index;
},
onNavToSelect() {
uni.navigateTo({
url: `/pages/payment-order/index`,
})
},
onOpenCalendar(){
this.show2 = true;
},
onSubmit() {
this.show = true
},
onCancel() {
this.show = false;
this.show2 = false;
},
onConfirm(e) {
this.orderInfo.signingDate = e[0];
this.onCancel();
},
onSave() {
this.show = false;
uni.showLoading({
title: "加载中..."
})
save({
...this.orderInfo,
companyName: this.factoryList[this.factoryIndex].label,
companyCode: this.factoryList[this.factoryIndex].value
}).then(res => {
uni.hideLoading();
if (res.data.__sys__.status === 0) {
uni.showToast({
icon: "success",
title: "新增成功"
})
setTimeout(() => {
this.onBack();
}, 1500)
}
})
},
onChange(e) {
let index = Number(e.target.value);
if (this.factoryIndex === index) return
this.factoryIndex = index;
},
onBack() {
uni.redirectTo({
url: "/pages/payment-order/list"
})
}
}
}
</script>
<style>
page {
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.cu-form-group {
picker {
padding-right: 0;
}
}
.header-title {
display: flex;
flex-direction: row;
width: 90%;
align-items: center;
margin: 30upx auto 12upx;
.flex-between {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
border-radius: 20upx;
padding: 16upx 20upx;
background-color: rgba(246, 246, 248, 1);
.image {
width: 34upx;
margin-right: 8upx;
max-height: 42upx;
}
.text-blue {
color: #4a93f8;
font-weight: bold;
}
}
}
.u-tabs-box {
width: 70%;
margin: 0 auto;
}
.data-content {
display: flex;
flex-direction: column;
margin: 0 auto 30upx;
width: 96%;
.circle-par {
display: flex;
justify-content: center;
align-items: center;
}
.header {
border-radius: 12upx 12upx 0 0;
background-color: #eef2fe;
color: #101010;
font-size: 30upx;
border: 1px solid #d1dcfd;
padding: 14upx 24upx;
}
.content {
border-radius: 0 0 12upx 12upx;
background-color: #ffffff;
color: #101010;
font-size: 30upx;
border: 1px solid #cecece;
border-top: none;
}
}
.flex-content {
display: flex;
width: 100%;
justify-content: center;
}
.part-3 {
flex-direction: column;
padding-bottom: 120upx;
.content-item {
display: flex;
flex-direction: column;
width: 90%;
margin: 24upx auto 8upx;
padding-bottom: 24upx;
.header-title {
position: relative;
width: 100%;
margin: 0;
image {
width: 100%;
max-height: 100upx;
}
.flex-between {
position: absolute;
top: 0;
left: 12%;
width: 88%;
height: 70%;
padding: 0;
justify-content: space-between;
background-color: transparent;
}
}
.content-box {
position: relative;
z-index: 2;
box-shadow: 0 0 12upx rgba(0, 0, 0, 0.34);
border-radius: 12upx;
margin-top: -20upx;
background-color: #ffffff;
padding: 24upx;
.flex-wrap {
display: flex;
flex-wrap: wrap;
.margin-sm {
margin: 10upx;
}
}
}
}
.content-item:last-child {
border-bottom: none;
}
}
.flex-center {
display: flex;
align-items: center;
}
.line-progress {
align-items: center;
}
.u-page__item__slot-icon {
width: 24px;
height: 24px;
}
.part-left {
align-items: center;
}
.circle-center {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.margin-top-sm {
margin-top: 10upx;
}
.flex-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
}
.icon {
width: 36upx;
max-height: 50upx;
margin-right: 6upx;
}
.flex-row-center {
display: flex;
flex-direction: row;
align-items: center;
}
.content-part-1 {
display: flex;
flex-direction: column;
align-items: center;
.header {
display: flex;
flex-direction: row;
align-items: center;
width: 92%;
padding: 30upx 0;
image {
width: 20px;
height: 20px;
margin-right: 6upx;
}
}
.form-content-box {
display: flex;
flex-direction: column;
width: 100%;
padding: 12upx 0;
border-radius: 4upx;
// box-shadow: 0 0 8upx rgba(0, 0, 0, 0.34);
background-color: #ffffff;
.cu-form-group {
height: 32px;
min-height: 32px;
.title {
display: flex;
flex-direction: row;
width: 200upx;
align-items: center;
}
.text-blue {
white-space: normal;
}
}
.action-box {
display: flex;
flex-direction: row;
justify-content: flex-end;
}
}
.footer-content {
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 120upx;
margin-bottom: 100upx;
.btn-box {
width: 80%;
}
}
}
.order-content-box {
display: flex;
flex-direction: column;
width: 100%;
background-color: #ffffff;
.header {
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
padding: 24upx;
image {
width: 20px;
height: 20px;
margin-right: 6upx;
}
}
.content-box {
position: relative;
z-index: 2;
padding: 0 24upx 24upx;
.flex-row {
margin: 6upx 0;
.text-title {
font-size: 30upx;
}
.part-1 {
font-size: 32upx;
width: 140upx;
text-align-last: justify;
}
.part-2 {
margin-right: 24upx;
}
}
.btn-box {
position: absolute;
right: 24upx;
bottom: 16upx;
}
}
}
.footer-box {
position: fixed;
left: 0;
bottom: 0;
display: flex;
flex-direction: row;
width: 100%;
padding: 24upx 36upx;
background-color: #ffffff;
z-index: 8;
.cu-btn {
display: flex;
flex: 1;
margin: 0 20upx;
}
}
.content-part-2 {
.header {
display: flex;
justify-content: space-between;
align-items: center;
.flex-row {
.cu-btn {
margin: 0 6upx;
}
}
}
.form-content-box {
display: flex;
background-color: transparent;
justify-content: center;
}
.form-content-box:last-child {
margin-bottom: 120upx;
}
}
.sub-item-box {
display: flex;
flex-direction: column;
width: 94%;
margin: 0 auto 8upx;
padding-bottom: 24upx;
.item-form {
position: relative;
z-index: 2;
border-radius: 12upx;
background-color: #ffffff;
box-shadow: 0 0 6upx rgba(0, 0, 0, 0.34);
margin-top: -20upx;
padding: 24upx;
}
.header-title {
position: relative;
width: 100%;
margin: 0;
image {
width: 100%;
max-height: 100upx;
}
.flex-between {
position: absolute;
top: 0;
left: 12%;
width: 88%;
height: 70%;
padding: 0;
justify-content: space-between;
background-color: transparent;
}
}
}
.cu-form-group uni-picker::after {
color: transparent;
}
</style>
\ No newline at end of file
<template>
<view>
<cu-custom bgColor="bg-blue" :isBack="true">
<block slot="backText">
<view class="list-icon" @tap="onBack">
<text class="cuIcon-back text-white text-bold text-xl"></text>
</view>
</block>
<block slot="content">
<text class="text-white">选择合同</text>
</block>
<block slot="right">
<text class="text-white text-bold text-lg margin-right" @tap="onCheck">确 定</text>
</block>
</cu-custom>
<view v-if="statusBarHeight>0" class="content-black" :style="{height:statusBarHeight+45+'px'}">
</view>
<view class="flex-col data-content" >
<view class="flex-col part-3">
<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-row">
<text class="text-gray part-1">甲方名称</text>
<text class="text-gray part-2">:</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 ellipsis">{{item.contractName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">合同类型</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{contractTypeEnum[item.contractType]}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">主合同号</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.contractNumber}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">项目编号</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.projCode}}</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.partyB}}</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">{{Number(item.totalContractPriceIncluding)}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {toJsonData} from "@/utils/tools.js";
import { getProList } from "@/api/settlement-doc.js";
import {getDict} from "@/api/index.js"
export default {
data() {
return {
projectDataList:[],
statusBarHeight: uni.getStorageSync("statusHeight") || 0,
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
queryData: {},
pageData:{
showCount: "true",
limit:5,
offset:0
},
current:0,
eventChannel: null,
contractTypeEnum:{},
contractNumber:''
};
},
onLoad(option) {
if(option.contractNumber){
this.contractNumber = option.contractNumber;
}else{
this.contractNumber = ''
}
this.eventChannel = this.getOpenerEventChannel();
this.onLoading();
},
onReachBottom() {
if (this.status == 'loadmore') {
this.pageData.offset += 1;
this.onGetList();
}
},
methods: {
onCheck(){
this.eventChannel.emit('acceptDataFromOpenedPage', {
...this.projectDataList[this.current],
totalContractPrice: this.projectDataList[this.current].totalContractPriceExcluding
} );
this.onBack();
},
onSelect(k){
this.current = k;
},
onBack(){
uni.navigateBack();
},
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();
},
onGetList() {
uni.showLoading({
title: "加载中"
})
getProList({
...this.queryData
},this.pageData).then(res => {
uni.hideLoading();
let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns)
if(this.contractNumber){
list = list.filter(item=>item.contractNumber != this.contractNumber);
}
if (this.pageData.offset == 0) {
this.projectDataList = list
} else {
this.projectDataList = [...this.projectDataList, ...list]
}
if (this.projectDataList.length < res.data.__blocks__.result.attr.count) {
this.status = "loadmore"
} else {
this.status = 'nomore'
}
})
}
}
}
</script>
<style>
page {
background-color: #ffffff;
}
</style>
<style lang="scss" scoped>
.page-content-box{
width: 100vw;
height: 100vh;
overflow: hidden;
}
.cu-form-group {
picker {
padding-right: 0;
}
}
.header-title {
display: flex;
flex-direction: row;
width: 96%;
align-items: center;
margin: 30upx auto 12upx;
.flex-between {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
border-radius: 20upx;
padding: 16upx 20upx;
background-color: rgba(246, 246, 248, 1);
.image {
width: 34upx;
margin-right: 8upx;
max-height: 42upx;
}
.text-blue {
color: #4a93f8;
font-weight: bold;
}
}
}
.u-tabs-box {
width: 100%;
margin: 0 auto;
}
.data-content {
display: flex;
flex-direction: column;
margin: 30upx auto;
width: 96%;
.circle-par {
display: flex;
justify-content: center;
align-items: center;
}
.header {
border-radius: 12upx 12upx 0 0;
background-color: #eef2fe;
color: #101010;
font-size: 30upx;
border: 1px solid #d1dcfd;
padding: 14upx 24upx;
}
.content {
border-radius: 0 0 12upx 12upx;
background-color: #ffffff;
color: #101010;
font-size: 30upx;
border: 1px solid #cecece;
border-top: none;
}
}
.flex-content {
display: flex;
width: 100%;
justify-content: center;
}
.part-3 {
flex-direction: column;
padding-bottom: 40upx;
.content-item {
display: flex;
flex-direction: column;
width: 94%;
margin: 24upx auto 8upx;
padding-bottom: 24upx;
.header-title {
position: relative;
width: 100%;
margin: 0;
image {
width: 100%;
max-height: 100upx;
}
.flex-between {
position: absolute;
top: 0;
left: 12%;
width: 88%;
height: 70%;
padding: 0;
justify-content: space-between;
background-color: transparent;
}
}
.content-box {
position: relative;
z-index: 2;
box-shadow: 0 0 12upx rgba(0, 0, 0, 0.34);
border-radius: 12upx;
margin-top: -20upx;
background-color: #ffffff;
padding: 24upx;
.flex-row{
margin: 6upx 0;
.part-1{
width: 140upx;
text-align-last: justify;
}
.part-2{
margin-right: 24upx;
}
}
}
.active{
box-shadow: 0 0 12upx #4a93f8;
}
}
.content-item:last-child {
border-bottom: none;
}
}
.flex-center {
display: flex;
align-items: center;
}
.line-progress {
align-items: center;
}
.u-page__item__slot-icon {
width: 24px;
height: 24px;
}
.part-left {
align-items: center;
}
.circle-center {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.margin-top-sm {
margin-top: 10upx;
}
.flex-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
}
.icon {
width: 36upx;
max-height: 50upx;
margin-right: 6upx;
}
.flex-row-center {
display: flex;
flex-direction: row;
align-items: center;
}
.content-part-1 {
display: flex;
flex-direction: column;
align-items: center;
.header {
display: flex;
flex-direction: row;
align-items: center;
width: 92%;
padding: 30upx 0;
image {
width: 20px;
height: 20px;
margin-right: 6upx;
}
}
.form-content-box {
width: 92%;
padding: 12upx 0;
border-radius: 12upx;
box-shadow: 0 0 8upx rgba(0, 0, 0, 0.34);
background-color: #ffffff;
.cu-form-group {
.title {
display: flex;
flex-direction: row;
width: 240upx;
align-items: center;
}
}
}
.footer-content {
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 120upx;
margin-bottom: 100upx;
.btn-box {
width: 80%;
}
}
}
.float-box{
position: fixed;
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 50px;
border-radius: 25px;
background-color: #4a93f8;
color: #ffffff;
box-shadow: 0 0 16upx rgba(74, 147, 248, 0.34),0 0 12upx rgba(74, 147, 248, 0.34) inset;
z-index: 99;
font-size: 32upx;
}
.factory-name{
max-width: 360upx;
.factory-title{
// width: 360upx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.ellipsis{
max-width: 420upx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
\ No newline at end of file
<template>
<view :class="floatBoxStatus? 'page-content-box':'' ">
<cu-custom bgColor="bg-blue" :isBack="true">
<block slot="backText">
<view class="list-icon" @tap="onBack">
<text class="cuIcon-back text-white text-bold text-xl"></text>
</view>
</block>
<block slot="content">
<text class="text-white">付款单管理</text>
</block>
<block slot="right">
<view class="margin-right" @tap="onNavToAdd">
<text class="text-white">新增</text>
</view>
</block>
</cu-custom>
<view v-if="statusBarHeight>0" class="content-black" :style="{height:statusBarHeight+45+'px'}">
</view>
<view class="flex-col data-content" >
<view class="flex-row header-title">
<picker mode="selector" :range="factoryList" v-model="factoryIndex" range-key="label" @change="onFactoryChange">
<view class="flex-row-center factory-name">
<text class="factory-title">{{factoryList.length? factoryList[factoryIndex].label:'厂别'}}</text>
<text class="cuIcon-unfold text-sm"></text>
</view>
</picker>
<view class="flex-1 margin-left-sm">
<u--input placeholder="请输入项目名称" v-model="queryData.projName" suffixIcon="search"
suffixIconStyle="color: #909399" :customStyle="{padding:'3px 6px'}" :fontSize="13" confirmType="search" @blur="onSearchByName"></u--input>
</view>
</view>
<view class="flex-col part-3">
<view v-for="(item,k) in projectDataList" :key="k" class="content-item">
<view class="header-title" @tap="onNavToOrderInfo(item)">
<image src="../../static/icon5.png" mode="widthFix"></image>
<view class="flex-between">
<text class="text-black text-bold ellipsis">{{item.partyA}}</text>
<view class="margin-right text-blue">
<text class="">详情</text>
<text class="cuIcon-right"></text>
</view>
</view>
</view>
<view class="flex-col content-box">
<view class="flex-row">
<text class="text-gray part-1">公司名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{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-title">{{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">{{item.contractNumber}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">付款单号</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.incomeNumber}}</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.totalContractPriceIncluding) || 0}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">付款日期</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.signingDate}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">核销状态</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{cancelStatusEnum[item.cancelStatus]}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">审批状态</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{reviewStatusEnum[item.reviewStatus]}}</text>
</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 v-if="projectDataList.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
<view v-if="projectDataList.length <= 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120">
</u-empty>
</view>
</view>
</view>
</view>
</template>
<script>
import { getDict } from '@/api/index.js';
import {
pathToBase64,
base64ToPath
} from '@/utils/index.js'
import {
toJsonData
} from "@/utils/tools.js";
import moment from "@/common/moment.js";
import { getParamsList } from "@/api/product-warehousing.js";
import { getList } from "@/api/payment-order.js";
export default {
data() {
return {
projectDataList:[],
statusBarHeight: uni.getStorageSync("statusHeight") || 0,
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
showText: false,
target: 60,
modelVale: 100,
value: 0,
title: '生产领料',
eChartData: [],
current:0,
formData: {},
//不良品类
form: {},
factoryIndex:0,
factoryList:[
{
value:"",
label:"全部"
}
],
floatTop:"",
floatLeft: "",
floatBoxStatus: false,
innerHeight: window.innerHeight,
innerWidth: window.innerWidth,
startTimeStamp:0,
endTimeStamp:0,
factoryEnum:{},
queryData: {},
pageData:{
showCount: "true",
limit:5,
offset:0
},
reviewStatusEnum:{},
cancelStatusEnum:{}
};
},
onLoad(option) {
this.onLoading();
},
onReachBottom() {
if (this.status == 'loadmore') {
this.pageData.offset += 1;
this.onGetList();
}
},
methods: {
onNavToAdd(){
uni.navigateTo({
url:"/pages/payment-order/add"
})
},
onFactoryChange(e){
this.factoryIndex = e.target.value;
this.pageData.offset = 0;
this.onGetList();
},
onBack(){
uni.redirectTo({
url:"/"
})
},
onLoading() {
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;
})
}
})
getParamsList().then(res=>{
let list = res.data.map(item=>{
this.factoryEnum[item.companyCode] = item.companyName
return {
label: item.companyName,
value: item.companyCode
}
})
this.factoryList = [...this.factoryList,...list];
this.$forceUpdate();
this.onGetList();
})
},
onGetList() {
uni.showLoading({
title: "加载中"
})
getList({
...this.queryData,
companyCode:this.factoryList[this.factoryIndex].value
},this.pageData).then(res => {
uni.hideLoading();
let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns)
if(list && list.length){
list = list.map(item=>{
let createdTime =item.createdTime? item.createdTime.split(''):[];
return {
...item,
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]}` :''
}
})
}
if (this.pageData.offset == 0) {
this.projectDataList = list
} else {
this.projectDataList = [...this.projectDataList, ...list]
}
if (this.projectDataList.length < res.data.__blocks__.result.attr.count) {
this.status = "loadmore"
} else {
this.status = 'nomore'
}
})
},
onChange(e) {
},
onSearchByName() {
this.pageData.offset = 0;
this.onGetList();
},
onChangeTab(e) {
this.current = e.index;
this.pageData.offset = 0;
this.onGetList();
},
onNavToOrderInfo(val){
uni.navigateTo({
url:`/pages/settlement-doc/edit?id=${val.id}`
})
}
}
}
</script>
<style>
page {
background-color: #ffffff;
}
</style>
<style lang="scss" scoped>
.page-content-box{
width: 100vw;
height: 100vh;
overflow: hidden;
}
.cu-form-group {
picker {
padding-right: 0;
}
}
.header-title {
display: flex;
flex-direction: row;
width: 96%;
align-items: center;
margin: 30upx auto 12upx;
.flex-between {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
border-radius: 20upx;
padding: 16upx 20upx;
background-color: rgba(246, 246, 248, 1);
.image {
width: 34upx;
margin-right: 8upx;
max-height: 42upx;
}
.text-blue {
color: #4a93f8;
font-weight: bold;
}
}
}
.u-tabs-box {
width: 100%;
margin: 0 auto;
}
.data-content {
display: flex;
flex-direction: column;
margin: 0 auto 30upx;
width: 96%;
.circle-par {
display: flex;
justify-content: center;
align-items: center;
}
.header {
border-radius: 12upx 12upx 0 0;
background-color: #eef2fe;
color: #101010;
font-size: 30upx;
border: 1px solid #d1dcfd;
padding: 14upx 24upx;
}
.content {
border-radius: 0 0 12upx 12upx;
background-color: #ffffff;
color: #101010;
font-size: 30upx;
border: 1px solid #cecece;
border-top: none;
}
}
.flex-content {
display: flex;
width: 100%;
justify-content: center;
}
.part-3 {
flex-direction: column;
padding-bottom: 120upx;
.content-item {
display: flex;
flex-direction: column;
width: 94%;
margin: 24upx auto 8upx;
padding-bottom: 24upx;
.header-title {
position: relative;
width: 100%;
margin: 0;
image {
width: 100%;
max-height: 100upx;
}
.flex-between {
position: absolute;
top: 0;
left: 12%;
width: 88%;
height: 70%;
padding: 0;
justify-content: space-between;
background-color: transparent;
}
}
.content-box {
position: relative;
z-index: 2;
box-shadow: 0 0 12upx rgba(0, 0, 0, 0.34);
border-radius: 12upx;
margin-top: -20upx;
background-color: #ffffff;
padding: 24upx;
.flex-row{
margin: 6upx 0;
.part-1{
width: 140upx;
text-align-last: justify;
}
.part-2{
margin-right: 24upx;
}
}
}
}
.content-item:last-child {
border-bottom: none;
}
}
.flex-center {
display: flex;
align-items: center;
}
.line-progress {
align-items: center;
}
.u-page__item__slot-icon {
width: 24px;
height: 24px;
}
.part-left {
align-items: center;
}
.circle-center {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.margin-top-sm {
margin-top: 10upx;
}
.flex-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
}
.icon {
width: 36upx;
max-height: 50upx;
margin-right: 6upx;
}
.flex-row-center {
display: flex;
flex-direction: row;
align-items: center;
}
.content-part-1 {
display: flex;
flex-direction: column;
align-items: center;
.header {
display: flex;
flex-direction: row;
align-items: center;
width: 92%;
padding: 30upx 0;
image {
width: 20px;
height: 20px;
margin-right: 6upx;
}
}
.form-content-box {
width: 92%;
padding: 12upx 0;
border-radius: 12upx;
box-shadow: 0 0 8upx rgba(0, 0, 0, 0.34);
background-color: #ffffff;
.cu-form-group {
.title {
display: flex;
flex-direction: row;
width: 240upx;
align-items: center;
}
}
}
.footer-content {
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 120upx;
margin-bottom: 100upx;
.btn-box {
width: 80%;
}
}
}
.float-box{
position: fixed;
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 50px;
border-radius: 25px;
background-color: #4a93f8;
color: #ffffff;
box-shadow: 0 0 16upx rgba(74, 147, 248, 0.34),0 0 12upx rgba(74, 147, 248, 0.34) inset;
z-index: 99;
font-size: 32upx;
}
.factory-name{
max-width: 360upx;
.factory-title{
// width: 360upx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.ellipsis{
max-width: 420upx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
\ No newline at end of file
......@@ -172,7 +172,7 @@
<text>{{Number(item.invWeight) || 0 }}</text>
</view>
</view>
<view class="cu-form-group">
<!-- <view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>单价:</text>
......@@ -189,7 +189,7 @@
<view class="">
<text>{{Number(item.amount) || 0 }}</text>
</view>
</view>
</view> -->
</form>
</view>
......
......@@ -154,7 +154,7 @@
<text>{{Number(subListObj.invWeight) || 0 }}</text>
</view>
</view>
<view class="cu-form-group">
<!-- <view class="cu-form-group">
<view class="title">
<text v-if="orderInfo.status=='0'" class="text-xl text-red">*</text>
<text>单价:</text>
......@@ -173,7 +173,7 @@
<view class="">
<text>{{Number(subListObj.amount) || 0 }}</text>
</view>
</view>
</view> -->
</form>
</view>
......
......@@ -205,7 +205,7 @@
<text>{{Number(item.invWeight) || 0 }}</text>
</view>
</view>
<view class="cu-form-group">
<!-- <view class="cu-form-group">
<view class="title">
<text>单价:</text>
</view>
......@@ -220,7 +220,7 @@
<view class="">
<text>{{Number(item.amount) || 0 }}</text>
</view>
</view>
</view> -->
</form>
</view>
......
......@@ -75,23 +75,24 @@
<text>{{orderInfo.thisSettlementAmount || 0}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="cu-form-group">
<view class="title">
<text>含税金额:</text>
<text>结算税额:</text>
</view>
<view class="text-blue">
<text>{{orderInfo.thisPriceTax || 0}}</text>
<text>{{orderInfo.thisSettlementTax || 0}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="cu-form-group">
<view class="title">
<text>结算税额:</text>
<text>含税金额:</text>
</view>
<view class="text-blue">
<text>{{orderInfo.thisSettlementTax || 0}}</text>
<text>{{orderInfo.thisPriceTax || 0}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>合同金额:</text>
......@@ -249,7 +250,7 @@
placeholder="请输入工程量" />
</view>
</view>
<view class="cu-form-group">
<!-- <view class="cu-form-group">
<view class="title">
<text>累计结算工程量:</text>
</view>
......@@ -257,7 +258,7 @@
<u-input v-model="item.cumulativeEngineeringQuantity" :disabled="true" color="#0081ff"
inputAlign="right" type="number" :border="border" placeholder="请输入工程量" />
</view>
</view>
</view> -->
<view class="cu-form-group">
<view class="title">
<text>单位:</text>
......@@ -292,7 +293,6 @@
</view>
<view class="cu-form-group">
<view class="title">
<text class="text-xl text-red">*</text>
<text>备注:</text>
</view>
<view class="text-blue">
......@@ -398,6 +398,7 @@
},
onNavToSelectList(val) {
console.log(val)
let ids = this.formList.map(item=>item.id);
uni.navigateTo({
url: `/pages/settlement-doc/select-list?selectIndex=${val}&contractNumber=${this.orderInfo.contractNumber}&contractType=${this.orderInfo.contractType}`,
events: {
......@@ -405,6 +406,7 @@
console.log(data)
this.formList.push(data);
this.$forceUpdate();
this.onCalculatePrice();
}
}
})
......@@ -415,10 +417,19 @@
if(this.formList && this.formList.length){
this.formList.forEach(item=>{
if(item.totalPrice){
num +=item.totalPrice
num += item.totalPrice
}
})
this.orderInfo.thisSettlementAmount = num;
this.orderInfo.thisSettlementAmount = num;//结算金额
this.orderInfo.cumulativeSettlementAmount = num;//累计结算金额
if(this.taxPointsIndex>=0){
this.orderInfo.thisPriceTax = num*(1+Number(this.taxPointsList[this.taxPointsIndex].label)/100); //含税金额
this.orderInfo.cumulativePriceTax = this.orderInfo.thisPriceTax; // 累计含税金额
this.orderInfo.thisSettlementTax = this.orderInfo.thisPriceTax - num; // 税额
this.orderInfo.cumulativeSettlementTax = this.orderInfo.thisSettlementTax; // 累计税额
}
console.log(this.orderInfo.thisSettlementAmount)
this.$forceUpdate();
}
......@@ -433,6 +444,7 @@
let index = Number(e.target.value);
if (this.taxPointsIndex === index) return
this.taxPointsIndex = index;
this.onCalculatePrice()
},
onPriceTaxChange(e) {
let index = Number(e.target.value);
......@@ -472,7 +484,7 @@
onNavToSelect() {
let that = this;
uni.navigateTo({
url: "/pages/settlement-doc/index",
url: `/pages/settlement-doc/index?contractNumber=${this.orderInfo.contractNumber}`,
events: {
acceptDataFromOpenedPage: (data) => {
console.log(data)
......@@ -494,6 +506,30 @@
})
return
}
if (this.settlementTypeIndex<0) {
uni.showToast({
icon: "none",
title: "请选择结算类别"
})
return
}
if (this.taxPointsIndex<0) {
uni.showToast({
icon: "none",
title: "请选择税点"
})
return
}
if (this.priceTaxSeparationIndex < 0) {
uni.showToast({
icon: "none",
title: "请选择价税分离"
})
return
}
if (!this.formList.length) {
uni.showToast({
icon: "none",
......@@ -520,8 +556,23 @@
title: "加载中..."
})
save({
...this.orderInfo,
contractDate: moment(this.orderInfo.contractDate).format("YYYYMMDD")
projCode: this.orderInfo.projCode,
projName: this.orderInfo.projName,
contractNumber: this.orderInfo.contractNumber,
contractName: this.orderInfo.contractName,
settlementNumber: '',
settlementType: this.settlementTypeList[this.settlementTypeIndex].value,
taxPoints:this.taxPointsList[this.taxPointsIndex].value,
priceTaxSeparation:this.priceTaxSeparationList[this.priceTaxSeparationIndex].value,
contractDate:this.orderInfo.contractDate,
thisSettlementAmount:this.orderInfo.thisSettlementAmount,
thisSettlementTax:this.orderInfo.thisSettlementTax,
thisPriceTax:this.orderInfo.thisPriceTax,
totalContractPrice:this.orderInfo.totalContractPrice,
cumulativeSettlementAmount:this.orderInfo.cumulativeSettlementAmount,
cumulativeSettlementTax:this.orderInfo.cumulativeSettlementTax,
cumulativePriceTax:this.orderInfo.cumulativePriceTax,
},this.formList).then(res => {
uni.hideLoading();
if (res.data.__sys__.status === 0) {
......@@ -781,7 +832,7 @@
.title {
display: flex;
flex-direction: row;
width: 280upx;
width: 300upx;
align-items: center;
}
......
......@@ -64,49 +64,59 @@
<view class="cu-form-group">
<view class="title">
<text>甲方名称</text>
<text>结算编号</text>
</view>
<view class="">
<text>{{orderInfo.partyA}}</text>
<text>{{orderInfo.settlementNumber}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>乙方名称</text>
<text>结算类别</text>
</view>
<view class="">
<text>{{orderInfo.partyB}}</text>
<text>{{settlementTypeEnum[orderInfo.settlementType]}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>扣款事由</text>
<text>结算金额</text>
</view>
<view class="">
<text>{{orderInfo.contractContent}}</text>
<text>{{orderInfo.thisSettlementAmount}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>扣款金额:</text>
<text>结算税额:</text>
</view>
<view class="">
<text>{{orderInfo.totalContractPriceIncluding}}</text>
<text>{{orderInfo.thisSettlementTax}}</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>
<text>结算日期:</text>
</view>
<view v-if="orderInfo.reviewStatus ==3" class="">
<text>{{orderInfo.totalContractPriceIncluding}}</text>
<text>{{orderInfo.contractDate}}</text>
</view>
<view v-else class="text-blue" @tap="onOpenCalendar">
<text>{{orderInfo.signingDate||"请选择日期"}}</text>
<text>{{orderInfo.contractDate||"请选择日期"}}</text>
<text class="cuIcon-right"></text>
</view>
......@@ -142,10 +152,7 @@
import {
getParamsData
} from "@/api/product-warehousing.js";
import {
getList,
updateSubmitStatus
} from "@/api/debit-note.js";
import { getList } from "@/api/settlement-doc.js";
export default {
data() {
......@@ -161,8 +168,13 @@
id: '',
submitStatusEnum:{
3:'已提交',
2:'未提交',
1:'已提交',
0:"待审核"
},
settlementTypeEnum:{
1:'部分结算',
2:'最终结算'
}
};
},
......
......@@ -10,7 +10,7 @@
<text class="text-white">选择合同</text>
</block>
<block slot="right">
<text class="text-green text-bold text-lg margin-right" @tap="onCheck">确 定</text>
<text class="text-white text-bold text-lg margin-right" @tap="onCheck">确 定</text>
</block>
</cu-custom>
<view v-if="statusBarHeight>0" class="content-black" :style="{height:statusBarHeight+45+'px'}">
......@@ -88,10 +88,16 @@
},
current:0,
eventChannel: null,
contractTypeEnum:{}
contractTypeEnum:{},
contractNumber:''
};
},
onLoad(option) {
if(option.contractNumber){
this.contractNumber = option.contractNumber;
}else{
this.contractNumber = ''
}
this.eventChannel = this.getOpenerEventChannel();
this.onLoading();
},
......@@ -139,6 +145,9 @@
uni.hideLoading();
let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns)
if(this.contractNumber){
list = list.filter(item=>item.contractNumber != this.contractNumber);
}
if (this.pageData.offset == 0) {
this.projectDataList = list
} else {
......
......@@ -102,6 +102,11 @@
<text class="text-gray part-2">:</text>
<text class="text-title">{{submitStatusEnum[item.reviewStatus]}}</text>
</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>
......@@ -236,9 +241,11 @@
let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns)
if(list && list.length){
list = list.map(item=>{
let createdTime =item.createdTime? item.createdTime.split(''):[];
return {
...item,
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]}` :''
}
})
}
......
......@@ -10,7 +10,7 @@
<text class="text-white">选择{{selectTypeEnum[selectIndex]}}</text>
</block>
<block slot="right">
<text class="text-green text-bold text-lg margin-right" @tap="onCheck">确 定</text>
<text class="text-white text-bold text-lg margin-right" @tap="onCheck">确 定</text>
</block>
</cu-custom>
<view v-if="statusBarHeight>0" class="content-black" :style="{height:statusBarHeight+45+'px'}">
......@@ -143,6 +143,10 @@
</view>
</view>
<view v-if="projectDataList.length <= 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120">
</u-empty>
</view>
</view>
</view>
</template>
......@@ -198,15 +202,24 @@
},
methods: {
onCheck(){
let unitPrice = 0;
if(this.selectIndex == 2){
unitPrice = 0 - Number(this.projectDataList[this.current].totalContractPriceIncluding)
}else{
unitPrice = this.projectDataList[this.current].unitPriceExcludingTax || this.projectDataList[this.current].totalContractPriceIncluding
}
let thisEngineeringQuantity = this.projectDataList[this.current].provisionalQuantity || 1
this.eventChannel.emit('acceptDataFromOpenedPage2', {
settlementBasis:this.selectTypeEnum[this.selectIndex],
taskName:'',
engineeringContent:"",
thisEngineeringQuantity: this.projectDataList[this.current].provisionalQuantity || 1,
thisEngineeringQuantity,
cumulativeEngineeringQuantity:'',
unit:"",
unitPrice: this.projectDataList[this.current].unitPriceExcludingTax || this.projectDataList[this.current].totalContractPriceIncluding ||this.projectDataList[this.current].totalContractPriceIncluding,
totalPrice:"",
unitPrice,
totalPrice: Number(thisEngineeringQuantity)* Number(unitPrice),
selectIndex: this.selectIndex
} );
this.onBack();
......
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