提交 18fc056c authored 作者: 宋雄's avatar 宋雄

修改订单流程

上级 25cf68a2
......@@ -590,6 +590,40 @@ export const deleteByIds = (params, config = {}) => {
})
}
// 获取验货列表
export const orderInspectionProcess = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post('/api/order/orderInspectionProcess/page',{}, {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 验货 回复
export const saveInspectionProcess = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post('/api/order/orderInspectionProcess/save', {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 订单详情
export const getOrderDetail = (params, config = {}) => {
return new Promise((resolve, reject) => {
......@@ -620,6 +654,21 @@ export const getOrderProcessList = (params, config = {}) => {
})
}
// 线上验货
export const onlineInspectionApi = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.get(`/api/order/order/confirmInspection/${params.id}`, {}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 获取合同列表
export const getContractList = (params, config = {}) => {
return new Promise((resolve, reject) => {
......@@ -637,6 +686,40 @@ export const getContractList = (params, config = {}) => {
})
}
// 上传合同
export const getUploadFileId = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post('/api/order/order/getUploadFileId', {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 对接法大大
export const getActorUrlApi = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post('/api/order//order/getActorUrl', {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 删除合同
export const deleteContract = (id, config = {}) => {
return new Promise((resolve, reject) => {
......@@ -1016,7 +1099,7 @@ export const operatorSaleOrderAudit = (params, config = {}) => {
const userInfo = JSON.parse(uni.getStorageSync('userInfo'))
let httpUrl = ''
if(userInfo.userCurrentPlat === 'operator') httpUrl = '/api/order/order/operatorSaleOrderAudit'
if(userInfo.userCurrentPlat === 'supplier') httpUrl = '/api/order/order/operatorSaleOrderAudit'
if(userInfo.userCurrentPlat === 'supplier') httpUrl = '/api/order/order/supplierSaleOrderAudit'
if(userInfo.userCurrentPlat === 'seller') httpUrl = '/api/order/order/sellerSaleOrderAudit'
return new Promise((resolve, reject) => {
http.post(httpUrl, {
......
......@@ -2,7 +2,8 @@
* 接口参数
*/
const serverConfig = {
baseURL: "http://116.148.227.177:8760",
// baseURL: "http://116.148.227.177:8760",
baseURL: "http://test.supew.com",
// baseURL: "http://www.supew.com/",
/* 根域名 */
// baseURL: "http://114.67.111.37:8001", /* 根域名 */
......
......@@ -30,9 +30,9 @@
</view>
</view>
<view class="flag-box">
<view class="flag unPay">{{item.payStatusName}}</view>
<view class="flag payed">{{item.deliverStatusName}}</view>
<view class="flag partPay">{{item.reconcileStatusName}}</view>
<view class="flag" :class="item.payStatus === 'unPay' ? 'unPay' : (item.payStatus === 'payed' ? 'payed' : 'partPay')">{{item.payStatusName}}</view>
<view class="flag" :class="item.deliverStatus === 'noDeliver' ? 'unPay' : (item.deliverStatus === 'allDeliver' ? 'payed' : 'partPay')">{{item.deliverStatusName}}</view>
<view class="flag" :class="item.reconcileStatus === 'noReconcile' ? 'unPay' : (item.reconcileStatus === 'allReconcile' ? 'payed' : 'partPay')">{{item.reconcileStatusName}}</view>
</view>
<view class="handle-box" @click="openHandle(item, index)">
<view class="handle">
......@@ -89,7 +89,8 @@
getBuyerList,
deleteByIds,
cancelById,
closeById
closeById,
onlineInspectionApi
} from '@/config/api.js'
import ShoppingSearch from '../../components/shopping-search/shopping-search.vue';
import noData from '../../components/no-data/no-data.vue';
......@@ -311,7 +312,7 @@
}
if (['margin', 'deliver', 'reconcile', 'invoice', 'receive', 'contract'].includes(item.stage) && hasPerm('Proprietary-side-ProcurementSalesOrder-Sales-ContractConfirmation')) {
handleList.push({
name: this.$t('index.contract-upload'),
name: item.contractStatus === 'contractWaitConfirmed' ? '签署合同' : this.$t('index.contract-upload'),
type: 'contract'
})
}
......@@ -363,13 +364,13 @@
type: 'balanceRefund'
})
}
if (['platformWaitExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver' && hasPerm('Proprietary-side-ProcurementSalesOrder-Sales-Cancel')) {
if ((['platformWaitExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver') && item.stage !== 'close'&&item.stage !== 'cancel' && !item.isSellerDeposit && hasPerm('Proprietary-side-ProcurementSalesOrder-Sales-Cancel')) {
handleList.push({
name: '取消订单',
type: 'cancel'
})
}
if (['platformWaitExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver' && hasPerm('Proprietary-side-ProcurementSalesOrder-Sales-Closeorder')) {
if ((['platformWaitExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver') && item.stage !== 'close'&&item.stage !== 'cancel' && !item.isSellerDeposit && hasPerm('Proprietary-side-ProcurementSalesOrder-Sales-Closeorder')) {
handleList.push({
name: '关闭订单',
type: 'cancel'
......@@ -382,15 +383,22 @@
})
}
} else if(userInfo.userCurrentPlat === 'supplier') {
if(item.supplierExamineStatus == 'supplierWaitExamine' && hasPerm('Supplier-side-SalesOrder-OrderReview')) {
if(item.supplierExamineStatus == 'supplierWaitExamine') {
handleList.push({
name: '订单审核',
type: 'orderVerify'
})
}
if(item.inspectionStatus === 'sellerWaitConfirm' && !['close', 'cancel', 'finished'].includes(item.stage)) {
handleList.push({
inspectionMethod: item.inspectionMethod,
name: '确认验货',
type: 'inspectionGoods'
})
}
if (['margin', 'deliver', 'reconcile', 'invoice', 'receive', 'contract'].includes(item.stage) && hasPerm('Supplier-side-SalesOrder-ContractConfirmation')) {
handleList.push({
name: this.$t('index.contract-upload'),
name: item.contractStatus === 'contractWaitConfirmed' ? '签署合同' : this.$t('index.contract-upload'),
type: 'contract'
})
}
......@@ -442,13 +450,13 @@
type: 'balanceRefund'
})
}
if (['platformWaitExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver' && hasPerm('Supplier-side-SalesOrder-Cancel')) {
if ((['platformWaitExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver') && item.stage !== 'close'&&item.stage !== 'cancel' && !item.isSellerDeposit && hasPerm('Supplier-side-SalesOrder-Cancel')) {
handleList.push({
name: '取消订单',
type: 'cancel'
})
}
if (['platformExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver' && hasPerm('Supplier-side-SalesOrder-Closeorder')) {
if ((['platformExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver') && item.stage !== 'close'&&item.stage !== 'cancel' && !item.isSellerDeposit && hasPerm('Supplier-side-SalesOrder-Closeorder')) {
handleList.push({
name: '关闭订单',
type: 'cancel'
......@@ -469,7 +477,7 @@
}
if (['margin', 'deliver', 'reconcile', 'invoice', 'receive', 'contract'].includes(item.stage) && hasPerm('Seller-side-SalesOrder-ContractConfirmation')) {
handleList.push({
name: this.$t('index.contract-upload'),
name: item.contractStatus === 'contractWaitConfirmed' ? '签署合同' : this.$t('index.contract-upload'),
type: 'contract'
})
}
......@@ -521,13 +529,13 @@
type: 'balanceRefund'
})
}
if (['platformWaitExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver' && hasPerm('Seller-side-SalesOrder-Cancel')) {
if ((['platformWaitExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus === 'noDeliver') && item.stage !== 'close' && item.stage !== 'cancel' && !item.isSellerDeposit && hasPerm('Seller-side-SalesOrder-Cancel')) {
handleList.push({
name: '取消订单',
type: 'cancel'
})
}
if (['platformExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus == 'noDeliver' && hasPerm('Seller-side-SalesOrder-Closeorder')) {
if ((['platformExamine', 'contract', 'margin', 'deliver'].includes(item.stage) || item.deliverStatus === 'noDeliver') && item.stage !== 'close'&&item.stage !== 'cancel' && !item.isSellerDeposit && hasPerm('Seller-side-SalesOrder-Closeorder')) {
handleList.push({
name: '关闭订单',
type: 'cancel'
......@@ -561,6 +569,7 @@
if (index === 3) this.screenObj.creditFacilitiesType = item.code
},
onHandleDetail(item) {
console.log(item)
this.$refs.handPopup.close()
let _this = this;
let id = this.orderList[current_order_key].orderId
......@@ -598,6 +607,23 @@
}
});
break;
case 'inspectionGoods':
if(item.inspectionMethod === '1') {
uni.navigateTo({
url: `/pages/detail/index?id=${id}&type=${item.type}`
})
} else {
uni.showModal({
title: '线上验货',
content: '确定线上验货吗?',
success: function(res) {
if (res.confirm) {
_this.inspectionOnline(id)
}
}
});
}
break;
default:
uni.navigateTo({
url: `/pages/detail/index?id=${id}&type=${item.type}`
......@@ -644,6 +670,18 @@
}, 30)
this.orderList.splice(current_order_key, 1)
})
},
inspectionOnline(id) {
onlineInspectionApi(id).then(res=> {
setTimeout(() => {
uni.showToast({
title: "确认验货成功!",
icon: 'none'
});
}, 30)
this.page = 1
this.getBuyerList()
})
}
},
onShow() {
......@@ -755,9 +793,9 @@
padding: 0 20rpx;
&.unPay {
color: #CE963D;
background-color: #FFFFFF;
border: 1rpx solid #E8CDA3;
color: #B60001;
background-color: #E6E7EB;
border: 1rpx solid #B60001;
}
&.payed {
......@@ -767,9 +805,9 @@
}
&.partPay {
color: #B60001;
background-color: #E6E7EB;
border: 1rpx solid #B60001;
color: #CE963D;
background-color: #FFFFFF;
border: 1rpx solid #E8CDA3;
}
}
}
......@@ -781,18 +819,18 @@
.handle-box {
position: absolute;
top: 0;
right: 30rpx;
right: 0;
z-index: 1;
.handle {
display: flex;
justify-content: center;
align-items: center;
height: 88rpx;
width: 88rpx;
font-size: 0;
.icon {
width: 14px;
height: 14px;
line-height: 16px;
text-align: center;
......
......@@ -97,7 +97,6 @@
</view>
</view>
<view class="address-box" v-if="orderInfo.customerReceiveInfo">
<text class="title"
style="height: 96rpx;line-height: 96rpx;color: #666;">{{$t('index.delivery-address')}}</text>
<view class="box">
......@@ -201,9 +200,7 @@
<view class="name">{{item.contractName}}({{item.contractNum}})</view>
<view class="info">
<text class="text">{{$t('index.from')}}:</text>
<view class="text">
{{item.sourceName}}
</view>
<view class="text">{{item.sourceName}}</view>
</view>
<view class="text">{{$t('index.expiration-date')}}:{{item.startDate}}~{{item.endDate}}
</view>
......@@ -211,8 +208,8 @@
<view style="display: flex;flex-direction: column;">
<uni-icons type="eye" size="30" @click.native="lookContract(item.uploadFileId)"></uni-icons>
<uni-icons
v-if="item.platformType === 'buyer' && orderStatusActive === 2.5 && orderType === 'contract'"
type="trash" size="30" @click.native="deleteContract(item.id)"></uni-icons>
v-if="!item.sellerSignDate && orderStatusActive === 2.5 && orderType === 'contract'"
type="auth-filled" size="30" @click.native="deleteContract(item)"></uni-icons>
</view>
</view>
<view class="box">
......@@ -237,7 +234,7 @@
<view class="contract-item" v-for="item in orderMarginList" :key="item.id">
<view class="deposit">
<view class="allPrice">
{{$t('index.order-sum')}}:¥{{orderMarginInfo.marginMoney}}{{$t('index.yuan')}}
{{$t('index.order-sum')}}:¥{{orderMarginInfo.marginMoney}}{{$t('index.yuan')}}<text v-if="item.status === 'notPass'">(定金驳回)</text>
</view>
<view class="text">{{$t('index.this-time-pay')}}:¥{{item.marginAmount}}{{$t('index.unit.price')}}</view>
<view class="text">{{$t('index.pay-time')}}:{{item.lastUpdateDate}}</view>
......@@ -458,6 +455,33 @@
</view>
</uni-collapse-item>
<!-- 线上验货 -->
<uni-collapse-item v-if="orderType === 'inspectionGoods'" name="inspectionGoods" :open="true">
<template v-slot:title>
<view class="title-box" id="contractRef">
<text class="message">线上验货</text>
</view>
</template>
<view class="contract-box" style="border-top: 1px solid #f2f2f2;">
<view class="contract-item" v-for="item in inspectionList" :key="item.id">
<view class="contract">
<view class="name">验货申请时间:{{item.inspectionDate}}</view>
<view class="info">
<text class="text">{{$t('index.from')}}:</text>
<view class="text">
{{item.platformType === 'buyer' ? '买家' : ''}}
{{item.platformType === 'seller' ? '店铺' : ''}}
{{item.platformType === 'supplier' ? '工厂' : ''}}
{{item.platformType === 'operator' ? '自营' : ''}}
</view>
</view>
<view class="text">备注:{{item.remark}}
</view>
</view>
</view>
</view>
</uni-collapse-item>
<uni-collapse-item name="steps" :open="true">
<template v-slot:title>
<view class="title-box">
......@@ -493,11 +517,23 @@
@click="confirmOrder('确认驳回此订单吗?', 'orderVerify', false)">{{ $t('index.reject') }}</button>
</view>
<view style="flex: 1;margin-left:30rpx;">
<button style="background: #086DCA;" @click="confirmOrder('确认审核通过吗?', 'orderVerify', true)"
<button style="background: #086DCA;" @click="$refs.marginRatePopup.open('center')"
class="button blue">{{ $t('index.sure') }}</button>
</view>
</view>
</block>
<block v-if="orderType === 'inspectionGoods'">
<view class="btn-btm">
<view style="flex: 1;">
<!-- <button class="button blue" @click="jumpPage(`/pages/receivingDetail/sellerIndex?id=${orderInfo.id}&type=${orderInfo.receiveType}`)">回复</button> -->
<button class="button blue" @click="openReconciliationPopup">回复</button>
</view>
<view style="flex: 1;margin-left:30rpx;">
<button style="background: #086DCA;" @click="confirmOrder('确认验货吗?', 'confirmInspection', true)"
class="button blue">确认验货</button>
</view>
</view>
</block>
<block v-if="orderType === 'address'">
<!-- <button v-if="orderInfo.receiveType && orderInfo.receiveType !== 'self'" class="button orange" @click="jumpPage(`/pages/address/index?id=${orderInfo.id}&addressId=${orderInfo.customerReceiveInfo.id}&time=${orderInfo.deliveryDate}`)">选择配送地址</button> -->
......@@ -529,11 +565,11 @@
<uni-icons type="plusempty" color="white" size="15"></uni-icons>
{{$t('index.contract-upload')}}</button>
</view>
<view style="flex: 1;margin-left:30rpx ;">
<!-- <view style="flex: 1;margin-left:30rpx ;">
<button style="background: #086DCA;"
@click="confirmOrder($t('index.msg-contract-info-upload'), 'contract')" class="button">
{{$t('index.sure')}}</button>
</view>
</view> -->
</view>
</block>
<block v-if="orderType === 'deposit'">
......@@ -654,6 +690,21 @@
</view>
</uni-popup>
<uni-popup ref="marginRatePopup" type="center" :mask-click="false">
<view class="reconciliation-popup">
<view class="box">
<view class="title">保证金比例</view>
<view class="message">
<input v-model="marginRate" type="number" placeholder="保证金比例(0~100)" />
</view>
</view>
<view class="bnt-box">
<view class="btn cancel" @click="$refs.marginRatePopup.close()">{{$t('index.cancel')}}</view>
<view class="btn confirm" @click="marginRateConfirm">{{$t('index.sure')}}</view>
</view>
</view>
</uni-popup>
<uni-popup ref="reconciliationPopup" type="center" :mask-click="false">
<view class="reconciliation-popup">
<view class="box">
......@@ -669,6 +720,26 @@
</view>
</view>
</uni-popup>
<uni-popup ref="inspectionPopup" type="center" :mask-click="false">
<view class="reconciliation-popup">
<view class="box">
<view class="title">验货回复</view>
</view>
<view class="box">
<view>
<uni-datetime-picker hide-second type="datetime" @change="changeInspectionDate" :value="inspectionDate" />
</view>
<view class="message">
<textarea class="input" confirm-type="done" placeholder="请输入备注" :maxlength="200" @input="refuseReasonInput" />
</view>
</view>
<view class="bnt-box">
<view class="btn cancel" @click="$refs.inspectionPopup.close()">{{$t('index.cancel')}}</view>
<view class="btn confirm" @click="inspectionConfirm">{{$t('index.sure')}}</view>
</view>
</view>
</uni-popup>
</view>
</template>
......@@ -677,7 +748,6 @@
getOrderDetail,
getOrderProcessList,
getContractList,
deleteContract,
editProductPrice,
contractConfirmation,
getOrderMarginInfo,
......@@ -700,7 +770,12 @@
paymentRejectPay,
rejectAccountStatement,
agreeAccountStatement,
getFnalRefundPayment
getFnalRefundPayment,
orderInspectionProcess,
saveInspectionProcess,
onlineInspectionApi,
getUploadFileId,
getActorUrlApi
} from '@/config/api.js'
import noData from '../../components/no-data/no-data.vue';
import stepPrice from '../../components/step-price/step-price.vue';
......@@ -712,14 +787,9 @@
noData,
stepPrice
},
computed: {
currentType() {
let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
return userInfo.userCurrentPlatName
}
},
data() {
return {
currentType: JSON.parse(uni.getStorageSync('userInfo')).userCurrentPlat,
orderType: 'detail',
collapseValue: ['message', 'delivery', 'deliveryReconciliation', 'self', 'selfReconciliation', 'deposit', 'depositRefund',
'contract', 'payment', 'productinvoice', 'physicalInvoice', 'invoice', 'steps'
......@@ -748,6 +818,8 @@
paymentInfo: {}, // 尾款信息
refundBalanceList: [], // 尾款退款列表
inspectionList: [], // 线上验货
invoiceList: [], // 未对账单
invoiceType: [{
lable: this.$t('index.invoice-electronic'),
......@@ -775,7 +847,10 @@
// physicalInvoiceList: [], // 物理发票列表
invoiceHistoryList: [], // 已开票发票列表
paddingBottomNumber: 0 // 页面底部的padding(button的个数)
paddingBottomNumber: 0, // 页面底部的padding(button的个数)
inspectionDate: '2024-05-12',
marginRate: undefined, // 保证金比例
}
},
computed: {
......@@ -832,10 +907,34 @@
})
},
onVerifyOrder(flag) {
if(flag) {
if(this.marginRate === undefined) {
uni.showToast({
title: '请输入保证金比例',
icon: 'none'
});
return
}
if(this.marginRate < 0 || this.marginRate > 100) {
uni.showToast({
title: '请输入正确的保证金比例',
icon: 'none'
});
return
}
}
const statusObj = {}
const userInfo = JSON.parse(uni.getStorageSync('userInfo'))
if(userInfo.userCurrentPlat === 'supplier') {
statusObj['supplierExamineStatus'] = flag ? 'supplierExaminePass' : 'supplierExamineReject'
} else {
statusObj['platformExamineStatus'] = flag ? 'platformExaminePass' : 'platformExamineReject'
}
operatorSaleOrderAudit({
id: this.orderInfo.id,
platformExamineStatus: flag ? 'platformExaminePass' : 'platformExamineReject',
refuseReason: ''
marginRate: this.marginRate,
refuseReason: '',
...statusObj
}).then(res=> {
setTimeout(() => {
uni.showToast({
......@@ -903,7 +1002,7 @@
let data = []
content.forEach(item => {
if (item.platformType === 'operator') item['sourceName'] = this.$t('index.platform-self')
if (item.platformType === 'buyer') item['sourceName'] = this.$t('index.buyer')
if (item.platformType === 'supplier') item['sourceName'] = this.$t('index.supplier')
if (item.platformType === 'seller') item['sourceName'] = this.$t('index.seller')
let uploadFileList = item.uploadFileId.split(',')
uploadFileList.forEach(id => {
......@@ -1012,10 +1111,10 @@
// })
},
getProcess(status) {
if (['platformExamine'].includes(status)) {
this.orderStatusActive = 1
} else if (['contract'].includes(status)) {
if (['platformExamine', 'supplierExamine'].includes(status)) {
this.orderStatusActive = 2
} else if (['contract'].includes(status)) {
this.orderStatusActive = 2.5
} else if (['margin'].includes(status) && this.orderInfo.payStatus === "unPay") {
this.orderStatusActive = 3
} else if (['margin'].includes(status) && ['marginWaitExamine', 'marginReject'].includes(this.orderInfo.payStatus)) {
......@@ -1108,23 +1207,39 @@
complete: function(res) {},
})
},
deleteContract(id) {
let _this = this
uni.showModal({
title: this.$t('index.notice-tip'),
content: this.$t('index.msg-contract-delete'),
success: function(res) {
if (res.confirm) {
deleteContract(id).then(res => {
uni.showToast({
title: this.$t('index.operate-success'),
icon: 'none'
});
_this.getContractList()
deleteContract(item) {
// let _this = this
// uni.showModal({
// title: this.$t('index.notice-tip'),
// content: this.$t('index.msg-contract-delete'),
// success: function(res) {
// if (res.confirm) {
// deleteContract(id).then(res => {
// uni.showToast({
// title: this.$t('index.operate-success'),
// icon: 'none'
// });
// _this.getContractList()
// })
// }
// }
// });
getUploadFileId({
contractId: item.id,
contractUrl: item.uploadFileId,
contractName: item.contractName + ".pdf"
}).then(res=> {
getActorUrlApi({
actorId: item.sellerCode,
contractId: item.id
}).then(res=> {
if(res && res.content) {
uni.navigateTo({
url: '/pages/web/web?webUrl=' + encodeURIComponent(res.content.actorSignTaskUrl)
})
}
}
});
})
})
},
getAccountStatementByOrderId() {
getAccountStatementByOrderId({
......@@ -1200,6 +1315,9 @@
case 'balanceRefund':
_this.handleBalanceRefund(data)
break
case 'confirmInspection':
_this.onConfirmInspection(data)
break
default:
break
}
......@@ -1463,11 +1581,35 @@
},
openReconciliationPopup(item) {
refuseId = item.id
this.$refs.reconciliationPopup.open('center')
this.$refs.inspectionPopup.open('center')
},
changeInspectionDate(val) {
this.inspectionDate = val
},
inspectionConfirm() {
saveInspectionProcess({
inspectionDate: this.inspectionDate,
orderId: this.orderInfo.id,
remark: refuseReason
}).then(res=> {
setTimeout(() => {
uni.showToast({
title: this.$t('index.operate-success')
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1500)
}, 30)
})
},
refuseReasonInput(e) {
refuseReason = e.detail.value
},
marginRateConfirm() {
this.onVerifyOrder(true)
},
reconciliationConfirm() {
if (refuseReason) {
this.$refs.reconciliationPopup.close()
......@@ -1582,7 +1724,7 @@
if (this.orderType === 'modify') btnNumber += 1
if (this.orderType === 'orderVerify') btnNumber += 1
if (this.orderStatusActive > 5 || this.orderType === 'receiving') btnNumber += 1
if (['contract', 'depositVerify', 'deposit', 'Pay', 'balanceVerify', 'balanceRefund'].includes(this.orderType)) btnNumber += 1
if (['contract', 'depositVerify', 'deposit', 'Pay', 'balanceVerify', 'balanceRefund', 'inspectionGoods'].includes(this.orderType)) btnNumber += 1
if (this.orderType === 'receiving') btnNumber += 1
// if (this.orderType === 'invoicing') btnNumber += 3
// if(this.orderType === 'address' || this.orderType === 'receiving') {
......@@ -1614,12 +1756,29 @@
});
}
this.$refs.handPopup.close()
},
pageInspectionProcess(orderId) {
orderInspectionProcess({
params: {orderId,
page: 1,
rows: 30}
}).then(res => {
this.inspectionList = res.content.content;
});
},
onConfirmInspection() {
onlineInspectionApi({id: this.orderInfo.id}).then(res=> {
})
}
},
onLoad(options) {
this.orderType = options.type
this.onGetDetail(options.id)
this.getOrderProcessList(options.id)
if(options.type === 'inspectionGoods') {
this.pageInspectionProcess(options.id)
}
},
onShow() {
if (this.orderInfo.orderNum) {
......
......@@ -142,7 +142,7 @@
serverConfig.platform_code = platRes.content[0]
setConfig(platRes.content[0])
let data = await customerToken({
loginType: "0",
loginType: "0", // 手机+密码登录
username: this.username,
password: encrypt(this.password)
})
......@@ -154,11 +154,14 @@
token: res.token
}
})
const isSupplier = info.content.userPlat.some(item=>item.key === 'supplier')
const isSeller = info.content.userPlat.some(item=>item.key === 'seller')
// const isOperator = info.content.userPlat.some(item=>item.key === 'operator')
let userInfo = {
customerCode: info.content.userInfo.customerCode,
customerName: info.content.userInfo.customerName,
loginName: info.content.userInfo.loginName,
userCurrentPlat: info.content.userCurrentPlat,
userCurrentPlat: isSupplier ? 'supplier' : (isSeller ? 'seller' : 'operator'),
userCurrentPlatName: info.content.userCurrentPlatName
}
uni.setStorageSync('userInfo', JSON.stringify(userInfo))
......
......@@ -46,10 +46,10 @@
<uni-icons type="plusempty" size="30" color='#D5E2F3'></uni-icons>
<text>{{$t('index.pdf-upload')}}</text>
</view>
<view class="plusempty" @click="choseImage">
<!-- <view class="plusempty" @click="choseImage">
<uni-icons type="plusempty" size="30" color='#D5E2F3'></uni-icons>
<text>{{$t('index.pictrue-upload')}}</text>
</view>
</view> -->
</view>
<view class="file-box">
<view class="file" v-for="(item, index) in fileList" :key="item.path">
......
......@@ -17,10 +17,10 @@
}
},
onReady() {
this.$refs.webView.post({
action: 'injectJS',
code: "document.addEventListener('DOMContentLoaded', function() { var title = document.title; uni.postMessage({ data: { type: 'title', title: title } });});"
})
// this.$refs.webView.post({
// action: 'injectJS',
// code: "document.addEventListener('DOMContentLoaded', function() { var title = document.title; uni.postMessage({ data: { type: 'title', title: title } });});"
// })
}
}
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论