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

修改订单流程

上级 25cf68a2
...@@ -590,6 +590,40 @@ export const deleteByIds = (params, config = {}) => { ...@@ -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 = {}) => { export const getOrderDetail = (params, config = {}) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -620,6 +654,21 @@ export const getOrderProcessList = (params, config = {}) => { ...@@ -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 = {}) => { export const getContractList = (params, config = {}) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -637,6 +686,40 @@ export const getContractList = (params, config = {}) => { ...@@ -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 = {}) => { export const deleteContract = (id, config = {}) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -1016,7 +1099,7 @@ export const operatorSaleOrderAudit = (params, config = {}) => { ...@@ -1016,7 +1099,7 @@ export const operatorSaleOrderAudit = (params, config = {}) => {
const userInfo = JSON.parse(uni.getStorageSync('userInfo')) const userInfo = JSON.parse(uni.getStorageSync('userInfo'))
let httpUrl = '' let httpUrl = ''
if(userInfo.userCurrentPlat === 'operator') httpUrl = '/api/order/order/operatorSaleOrderAudit' 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' if(userInfo.userCurrentPlat === 'seller') httpUrl = '/api/order/order/sellerSaleOrderAudit'
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
http.post(httpUrl, { http.post(httpUrl, {
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
* 接口参数 * 接口参数
*/ */
const serverConfig = { 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://www.supew.com/",
/* 根域名 */ /* 根域名 */
// baseURL: "http://114.67.111.37:8001", /* 根域名 */ // baseURL: "http://114.67.111.37:8001", /* 根域名 */
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
</view> </view>
</view> </view>
<view class="flag-box"> <view class="flag-box">
<view class="flag unPay">{{item.payStatusName}}</view> <view class="flag" :class="item.payStatus === 'unPay' ? 'unPay' : (item.payStatus === 'payed' ? 'payed' : 'partPay')">{{item.payStatusName}}</view>
<view class="flag payed">{{item.deliverStatusName}}</view> <view class="flag" :class="item.deliverStatus === 'noDeliver' ? 'unPay' : (item.deliverStatus === 'allDeliver' ? 'payed' : 'partPay')">{{item.deliverStatusName}}</view>
<view class="flag partPay">{{item.reconcileStatusName}}</view> <view class="flag" :class="item.reconcileStatus === 'noReconcile' ? 'unPay' : (item.reconcileStatus === 'allReconcile' ? 'payed' : 'partPay')">{{item.reconcileStatusName}}</view>
</view> </view>
<view class="handle-box" @click="openHandle(item, index)"> <view class="handle-box" @click="openHandle(item, index)">
<view class="handle"> <view class="handle">
...@@ -89,7 +89,8 @@ ...@@ -89,7 +89,8 @@
getBuyerList, getBuyerList,
deleteByIds, deleteByIds,
cancelById, cancelById,
closeById closeById,
onlineInspectionApi
} from '@/config/api.js' } from '@/config/api.js'
import ShoppingSearch from '../../components/shopping-search/shopping-search.vue'; import ShoppingSearch from '../../components/shopping-search/shopping-search.vue';
import noData from '../../components/no-data/no-data.vue'; import noData from '../../components/no-data/no-data.vue';
...@@ -311,7 +312,7 @@ ...@@ -311,7 +312,7 @@
} }
if (['margin', 'deliver', 'reconcile', 'invoice', 'receive', 'contract'].includes(item.stage) && hasPerm('Proprietary-side-ProcurementSalesOrder-Sales-ContractConfirmation')) { if (['margin', 'deliver', 'reconcile', 'invoice', 'receive', 'contract'].includes(item.stage) && hasPerm('Proprietary-side-ProcurementSalesOrder-Sales-ContractConfirmation')) {
handleList.push({ handleList.push({
name: this.$t('index.contract-upload'), name: item.contractStatus === 'contractWaitConfirmed' ? '签署合同' : this.$t('index.contract-upload'),
type: 'contract' type: 'contract'
}) })
} }
...@@ -363,13 +364,13 @@ ...@@ -363,13 +364,13 @@
type: 'balanceRefund' 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({ handleList.push({
name: '取消订单', name: '取消订单',
type: 'cancel' 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({ handleList.push({
name: '关闭订单', name: '关闭订单',
type: 'cancel' type: 'cancel'
...@@ -382,15 +383,22 @@ ...@@ -382,15 +383,22 @@
}) })
} }
} else if(userInfo.userCurrentPlat === 'supplier') { } else if(userInfo.userCurrentPlat === 'supplier') {
if(item.supplierExamineStatus == 'supplierWaitExamine' && hasPerm('Supplier-side-SalesOrder-OrderReview')) { if(item.supplierExamineStatus == 'supplierWaitExamine') {
handleList.push({ handleList.push({
name: '订单审核', name: '订单审核',
type: 'orderVerify' 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')) { if (['margin', 'deliver', 'reconcile', 'invoice', 'receive', 'contract'].includes(item.stage) && hasPerm('Supplier-side-SalesOrder-ContractConfirmation')) {
handleList.push({ handleList.push({
name: this.$t('index.contract-upload'), name: item.contractStatus === 'contractWaitConfirmed' ? '签署合同' : this.$t('index.contract-upload'),
type: 'contract' type: 'contract'
}) })
} }
...@@ -442,19 +450,19 @@ ...@@ -442,19 +450,19 @@
type: 'balanceRefund' 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({ handleList.push({
name: '取消订单', name: '取消订单',
type: 'cancel' 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({ handleList.push({
name: '关闭订单', name: '关闭订单',
type: 'cancel' 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({ handleList.push({
name: '删除订单', name: '删除订单',
type: 'edit' type: 'edit'
...@@ -469,7 +477,7 @@ ...@@ -469,7 +477,7 @@
} }
if (['margin', 'deliver', 'reconcile', 'invoice', 'receive', 'contract'].includes(item.stage) && hasPerm('Seller-side-SalesOrder-ContractConfirmation')) { if (['margin', 'deliver', 'reconcile', 'invoice', 'receive', 'contract'].includes(item.stage) && hasPerm('Seller-side-SalesOrder-ContractConfirmation')) {
handleList.push({ handleList.push({
name: this.$t('index.contract-upload'), name: item.contractStatus === 'contractWaitConfirmed' ? '签署合同' : this.$t('index.contract-upload'),
type: 'contract' type: 'contract'
}) })
} }
...@@ -521,13 +529,13 @@ ...@@ -521,13 +529,13 @@
type: 'balanceRefund' 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({ handleList.push({
name: '取消订单', name: '取消订单',
type: 'cancel' 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({ handleList.push({
name: '关闭订单', name: '关闭订单',
type: 'cancel' type: 'cancel'
...@@ -561,6 +569,7 @@ ...@@ -561,6 +569,7 @@
if (index === 3) this.screenObj.creditFacilitiesType = item.code if (index === 3) this.screenObj.creditFacilitiesType = item.code
}, },
onHandleDetail(item) { onHandleDetail(item) {
console.log(item)
this.$refs.handPopup.close() this.$refs.handPopup.close()
let _this = this; let _this = this;
let id = this.orderList[current_order_key].orderId let id = this.orderList[current_order_key].orderId
...@@ -598,6 +607,23 @@ ...@@ -598,6 +607,23 @@
} }
}); });
break; 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: default:
uni.navigateTo({ uni.navigateTo({
url: `/pages/detail/index?id=${id}&type=${item.type}` url: `/pages/detail/index?id=${id}&type=${item.type}`
...@@ -644,6 +670,18 @@ ...@@ -644,6 +670,18 @@
}, 30) }, 30)
this.orderList.splice(current_order_key, 1) 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() { onShow() {
...@@ -755,9 +793,9 @@ ...@@ -755,9 +793,9 @@
padding: 0 20rpx; padding: 0 20rpx;
&.unPay { &.unPay {
color: #CE963D; color: #B60001;
background-color: #FFFFFF; background-color: #E6E7EB;
border: 1rpx solid #E8CDA3; border: 1rpx solid #B60001;
} }
&.payed { &.payed {
...@@ -767,9 +805,9 @@ ...@@ -767,9 +805,9 @@
} }
&.partPay { &.partPay {
color: #B60001; color: #CE963D;
background-color: #E6E7EB; background-color: #FFFFFF;
border: 1rpx solid #B60001; border: 1rpx solid #E8CDA3;
} }
} }
} }
...@@ -781,18 +819,18 @@ ...@@ -781,18 +819,18 @@
.handle-box { .handle-box {
position: absolute; position: absolute;
top: 0; top: 0;
right: 30rpx; right: 0;
z-index: 1;
.handle { .handle {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 88rpx; height: 88rpx;
width: 88rpx;
font-size: 0; font-size: 0;
.icon { .icon {
width: 14px;
height: 14px; height: 14px;
line-height: 16px; line-height: 16px;
text-align: center; text-align: center;
......
差异被折叠。
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
serverConfig.platform_code = platRes.content[0] serverConfig.platform_code = platRes.content[0]
setConfig(platRes.content[0]) setConfig(platRes.content[0])
let data = await customerToken({ let data = await customerToken({
loginType: "0", loginType: "0", // 手机+密码登录
username: this.username, username: this.username,
password: encrypt(this.password) password: encrypt(this.password)
}) })
...@@ -154,11 +154,14 @@ ...@@ -154,11 +154,14 @@
token: res.token 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 = { let userInfo = {
customerCode: info.content.userInfo.customerCode, customerCode: info.content.userInfo.customerCode,
customerName: info.content.userInfo.customerName, customerName: info.content.userInfo.customerName,
loginName: info.content.userInfo.loginName, loginName: info.content.userInfo.loginName,
userCurrentPlat: info.content.userCurrentPlat, userCurrentPlat: isSupplier ? 'supplier' : (isSeller ? 'seller' : 'operator'),
userCurrentPlatName: info.content.userCurrentPlatName userCurrentPlatName: info.content.userCurrentPlatName
} }
uni.setStorageSync('userInfo', JSON.stringify(userInfo)) uni.setStorageSync('userInfo', JSON.stringify(userInfo))
......
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
<uni-icons type="plusempty" size="30" color='#D5E2F3'></uni-icons> <uni-icons type="plusempty" size="30" color='#D5E2F3'></uni-icons>
<text>{{$t('index.pdf-upload')}}</text> <text>{{$t('index.pdf-upload')}}</text>
</view> </view>
<view class="plusempty" @click="choseImage"> <!-- <view class="plusempty" @click="choseImage">
<uni-icons type="plusempty" size="30" color='#D5E2F3'></uni-icons> <uni-icons type="plusempty" size="30" color='#D5E2F3'></uni-icons>
<text>{{$t('index.pictrue-upload')}}</text> <text>{{$t('index.pictrue-upload')}}</text>
</view> </view> -->
</view> </view>
<view class="file-box"> <view class="file-box">
<view class="file" v-for="(item, index) in fileList" :key="item.path"> <view class="file" v-for="(item, index) in fileList" :key="item.path">
......
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
} }
}, },
onReady() { onReady() {
this.$refs.webView.post({ // this.$refs.webView.post({
action: 'injectJS', // action: 'injectJS',
code: "document.addEventListener('DOMContentLoaded', function() { var title = document.title; uni.postMessage({ data: { type: 'title', title: title } });});" // code: "document.addEventListener('DOMContentLoaded', function() { var title = document.title; uni.postMessage({ data: { type: 'title', title: title } });});"
}) // })
} }
} }
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论