提交 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,19 +450,19 @@
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'
})
}
if((item.stage == 'platformExamine' || item.supplierExamineStatus == 'supplierWaitExamine') && hasPerm('Supplier-side-SalesOrder-Closeorder')) {
if((item.stage == 'platformExamine' || item.supplierExamineStatus == 'supplierWaitExamine') && hasPerm('Supplier-side-SalesOrder-Closeorder')) {
handleList.push({
name: '删除订单',
type: 'edit'
......@@ -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;
......
差异被折叠。
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论