Commit b68ecd63 by 李伟康

Merge branch 'SAAS+V5.5.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.5.0

2 parents 09791589 8a1363aa
......@@ -2,7 +2,7 @@ import http from '../request/http'
module.exports = {
/**新建车损报价单 */
quotationAdd (data) {
quotationAdd(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add',
projectName: 'boutique',
......@@ -10,7 +10,7 @@ module.exports = {
})
},
/** 报价单支付订单生成(带上签名)返回订单号(商户地址) */
quotationUpgrade (data) {
quotationUpgrade(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.pay.order.generate',
projectName: 'boutique',
......@@ -18,7 +18,7 @@ module.exports = {
})
},
// 校验订单是否需要上传合同协议
checkZyPayFlag (data) {
checkZyPayFlag(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.check',
projectName: 'boutique',
......@@ -27,7 +27,7 @@ module.exports = {
},
// 查询店铺配置
getShopMerchantPointConfig (data) {
getShopMerchantPointConfig(data) {
return http.post({
method: 'dj.api.smartcarlife.shopMerchantPointConfig.get',
projectName: 'boutique',
......@@ -36,7 +36,7 @@ module.exports = {
},
/** 查询报价单信息 */
getQuotationInfoById (data) {
getQuotationInfoById(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.find.by.id',
projectName: 'boutique',
......@@ -46,7 +46,7 @@ module.exports = {
/**
* 订单详情
*/
getOrderDetail (data) {
getOrderDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.order.detail',
projectName: 'boutique',
......@@ -54,7 +54,7 @@ module.exports = {
})
},
/**pos支付 */
getPosQr (data) {
getPosQr(data) {
return http.post({
method: 'dj.api.smartcarlife.payOrder.create',
projectName: 'boutique',
......@@ -65,7 +65,7 @@ module.exports = {
* 查询门店录单设置
},
*/
orderSettingList (data) {
orderSettingList(data) {
return http.post({
method: 'dj.api.smartcarlife.order.field.setting.list',
projectName: 'boutique',
......@@ -74,7 +74,7 @@ module.exports = {
},
/** 报价单分页列表 */
quotationPage (data) {
quotationPage(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique',
......@@ -82,7 +82,7 @@ module.exports = {
})
},
/** 根据id查询报价单数据 */
getQuotationInfo (data) {
getQuotationInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate',
projectName: 'boutique',
......@@ -90,7 +90,7 @@ module.exports = {
})
},
/** 修改车损报价单客户基本信息信息 */
updateCustomerInfo (data) {
updateCustomerInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update',
projectName: 'boutique',
......@@ -99,7 +99,7 @@ module.exports = {
},
/** 报价单订单分状态统计信息 */
orderStatistics (data) {
orderStatistics(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics',
projectName: 'boutique',
......@@ -107,7 +107,7 @@ module.exports = {
})
},
// 查询订单是否支持状态变更
getOrderRefundStep (data) {
getOrderRefundStep(data) {
return http.post({
method: 'dj.api.smartcarlife.refundApplyRecord.isExist',
projectName: 'boutique',
......@@ -115,7 +115,7 @@ module.exports = {
})
},
/**报价单-撤销工单 */
cancelOrderById (data) {
cancelOrderById(data) {
return http.post({
method: 'dj.api.smartcarlife.quotation.cancel',
projectName: 'boutique',
......@@ -123,7 +123,7 @@ module.exports = {
})
},
// 车损报价单战败订单创建
defeatOrderCreate (data) {
defeatOrderCreate(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order',
projectName: 'boutique',
......@@ -131,21 +131,46 @@ module.exports = {
})
},
// 更新合同协议内容
updateZyInfo (data) {
updateZyInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update',
projectName: 'boutique',
...data
})
},
/** 根据商户号商品id获取可选升级商品列表 */
quotationGoodsList(data) {
return http.post({
method: 'dj.api.smartcarlife.quotationGoods.list',
projectName: 'boutique',
...data
})
},
/**
* /** 修改车损报价单信息 */
updateQuotation (data) {
updateQuotation(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.update',
projectName: 'boutique',
...data
})
},
getCheckEmployeeList(data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1]
return http.post({
method: 'dj.api.smartcarlife.employee.onTheJob.getByMerchantId',
projectName: 'boutique',
...data
})
// return api.post("dj.api.smartcarlife.employee.getByMerchantId", data);
},
/** 更新报价单状态 */
updateOrderStatus(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.status.update',
projectName: 'boutique',
...data
})
}
}
......@@ -249,6 +249,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.4761295822676897) calc(100vmin * (1173 / 768) * -0.19138959931798807);}
.icon-pbjd-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.340153452685422) calc(100vmin * (1173 / 768) * -0.15601023017902813);}
.icon-pdf-xl { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.1658141517476556) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-pdf { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.5336743393009378) calc(100vmin * (1173 / 768) * -0.38064791133844844);}
.icon-pen-active { width: calc(100vmin * (1173 / 768) * 0.05115089514066496); height: calc(100vmin * (1173 / 768) * 0.05115089514066496);
......@@ -260,7 +262,7 @@
.icon-point-active { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04859335038363171);
background-position: calc(100vmin * (1173 / 768) * -0.05754475703324808) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-point { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.1658141517476556) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
background-position: calc(100vmin * (1173 / 768) * -0.21994884910485935) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-points { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.4514066496163683) calc(100vmin * (1173 / 768) * -0.6381074168797954);}
.icon-promotion { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
......@@ -300,7 +302,7 @@
.icon-reception-share { width: calc(100vmin * (1173 / 768) * 0.02216538789428815); height: calc(100vmin * (1173 / 768) * 0.02216538789428815);
background-position: calc(100vmin * (1173 / 768) * -0.7020460358056266) calc(100vmin * (1173 / 768) * -0.05711849957374254);}
.icon-record-active { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.21994884910485935) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
background-position: calc(100vmin * (1173 / 768) * -0.27408354646206307) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-record { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.050724637681159424) calc(100vmin * (1173 / 768) * -0.5400682011935208);}
.icon-revoke { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
......@@ -405,11 +407,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.08013640238704177) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-two-arrow { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.010230179028132993);
background-position: calc(100vmin * (1173 / 768) * -0.2885763000852515) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
<<<<<<< HEAD
=======
.icon-up-arrow { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.27024722932651324) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
>>>>>>> 34c2de92db21e1379e36b7dc81196e3b65332eee
.icon-upload-play { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.07033248081841433) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-uploadAdd { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
......@@ -425,17 +424,4 @@
.icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
background-position: calc(100vmin * (1173 / 768) * -0.18414322250639387) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.1402387041773231) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
<<<<<<< HEAD
.icon-green-arrow { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.23358908780903667) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-normal { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.25191815856777494) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-pdf-xl { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.27408354646206307) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-up-arrow { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.27024722932651324) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
=======
.icon-pdf-xl { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.27408354646206307) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
>>>>>>> 34c2de92db21e1379e36b7dc81196e3b65332eee
background-position: calc(100vmin * (1173 / 768) * -0.1402387041773231) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
\ No newline at end of file

2.92 MB | W: | H:

2.92 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<view class="employee-list">
<template v-for="(i, index) in list">
<view
:key="index"
@click="choose(i)"
:class="['item flex', { active: checkActive(i) }]"
>
<view :key="index" @click="choose(i)" :class="['item flex', { active: checkActive(i) }]">
<view class="sprite-icon icon-tag-checked"></view>
{{ i.staffName }}
</view>
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 1
const index = 2
/**
*
0本地
......
......@@ -87,7 +87,18 @@ export default {
methods: {
open(data) {
this.currentId = ''
this.data = data
console.log('data', data)
if (data && data.zyPayUrl) {
const urls = data.zyPayUrl.split(',').filter(url => url.trim())
this.$set(this.contractData, this.uploadField.key, urls.map(url => ({
url: url.trim(),
type: this.getFileTypeFromUrl(url.trim()),
name: this.getFileNameFromUrl(url.trim()),
size: 0 // 从字符串无法获取文件大小
})))
console.log('this.contractData', this.contractData)
}
this.$nextTick(() => {
this.$refs.popup.open()
})
......@@ -270,7 +281,7 @@ export default {
// 获取合同文件数组
getContractFiles() {
const files = this.contractData[this.uploadField.key]
return Array.isArray(files) ? files : []
return Array.isArray(files) ? files : []
},
// 检查是否是PDF文件
......@@ -367,10 +378,19 @@ export default {
}
return true
},
confirm () {
if (this.validate){
this.$emit('onConfirm',this.contractData)
}
confirm() {
if (this.validate) {
this.$emit('onConfirm', this.contractData)
}
},
getFileTypeFromUrl(url) {
const ext = url.split('.').pop().toLowerCase()
return ext === 'pdf' ? 'pdf' : 'image'
},
// 从URL获取文件名
getFileNameFromUrl(url) {
return url.split('/').pop().split('?')[0] || '未知文件'
},
}
}
......
......@@ -43,20 +43,15 @@ import utils from '@/utils/utils'
import dayjs from 'dayjs'
import OrderPopup from '@/components/OrderPopup/index.vue'
import GlCell from '../../../../components/Form/GlCell.vue'
import Product from './Product.vue'
import Package from './Package.vue'
import SkuGoods from './SkuGoods.vue'
import { checkDailyReport, showNextModal } from '@/utils/modalUtils'
import { DEFEAT_FORM_LIST, defeat_titleList, popupTypeEnum, payTypeList } from '../contant'
import { debounce } from 'lodash'
import NP from 'number-precision'
export default {
name: 'DefeatOrder',
components: {
GlCell,
OrderPopup,
Product,
Package,
SkuGoods
OrderPopup
},
props: {
transmissionOfData: {
......@@ -141,6 +136,7 @@ export default {
formList: utils.deepClone(DEFEAT_FORM_LIST),
userInfo: {},
baseConfigData: {},
valueKey: '',
requiredList: [], // 录单设置的必填项
orderObj: {
deafeatReason: '',
......@@ -182,7 +178,8 @@ export default {
djPayList: [], // 嘀加收款方对应支付方式
merchantPayList: [], // 门店收款方对应支付方式
configPayTypeList: [], // 园区店配置支持的支付方式
payTypeList
payTypeList,
defaultMsg: null
}
},
computed: {
......@@ -203,7 +200,7 @@ export default {
this.initData()
},
methods: {
initData() {
async initData() {
const { userInfo } = this
console.log(this.orderObj, 'this.orderObj')
if (!this.orderObj.id) {
......@@ -220,7 +217,9 @@ export default {
merchantName: userInfo.shopMerchantName
})
}
await this.getEmployeeList()
this.getLastUserOrderInfo()
this.getGoodsProduct()
},
// handlerUserInfo() {
// let userInfo = uni.$storage.get('userInfo')
......@@ -253,11 +252,30 @@ export default {
console.log(this.popupType, this.externalData, '-------------')
this.$refs.orderPopup.open()
},
// 获取 销售顾问列表
async getEmployeeList() {
console.log('getEmployeeList')
const { userInfo, orderObj } = this
const { shopMerchantId, sceneType, merchantId } = userInfo,
data = await uni.$api.popupApi.getEmployeeList({
merchantId: orderObj.idKey == 'sellerUserId' ? merchantId : shopMerchantId,
sceneList: orderObj.idKey == 'sellerUserId' ? '' : [sceneType]
})
if (data && data.length) {
this.employeeList = data
console.log(data, 'data')
this.$set(this.orderObj, 'employeeName', data[0].staffName)
this.orderObj.userId = data[0].uuid
this.orderObj.referrerId = data[0].uuid
console.log(this.orderObj, 'this.orderObj')
}
},
// 获取上一个订单的销售顾问信息 并且不是再次下单
async getLastUserOrderInfo() {
const res = await uni.$api.boutiqueApi.getLastUserOrderInfo({
sellerUserId: this.userInfo.subLoginUser.uuid
})
console.log(res, '上一个订单的销售顾问信息')
this.$set(this.orderObj, 'employeeName', res.employeeName)
this.orderObj.userId = res.userId
console.log(res, '上一个订单的销售顾问信息')
......@@ -291,6 +309,12 @@ export default {
this.orderObj.customerName = chooseContent.customerName
this.orderObj.customerPhone = chooseContent.customerPhone
}
if (val.popupType == 0) {
console.log(chooseContent, 'chooseContent')
this.orderObj.employeeName = chooseContent.staffName
this.orderObj.userId = chooseContent.uuid
this.orderObj.referrerId = chooseContent.uuid
}
console.log(this.orderObj)
},
checkRequired() {
......@@ -378,45 +402,7 @@ export default {
console.log(this.orderObj, '提交参数')
let { default4SStoreInfo } = this.userInfo
console.log(default4SStoreInfo, '4s店信息')
let params = {
owner: {
ageRange: '',
carBrand: '',
carBrandId: '',
carChildsBrandId: '',
carChildsBrandName: '',
carColor: '',
carSeriesId: '',
carSeriesName: '',
carVin: '',
certificateNo: '',
city: '',
companion: '',
confirmStatus: false,
owner: '', //客户姓名
ownerGender: '',
phone: '', //客户手机号
price: '',
salesType: 0,
saveStatus: false,
seat: 5
},
total: 1,
mode: 1,
check: true,
insurancePrice: 0,
merchantId4s: default4SStoreInfo.merchantId,
merchantName4s: default4SStoreInfo.merchantName,
minEquityPrice: 0,
payType: 1,
defeatOrder: true,
payee: 0,
paymentDocList: [],
quotedPriceUpdate: 0,
referrer: '', //推荐人,
referrerId: '', //
transactionNo: ''
}
let params = this.defaultMsg
params.owner.owner = this.orderObj.customerName
params.owner.phone = this.orderObj.customerPhone
params.owner.salesType = this.orderObj.salesType
......@@ -424,7 +410,7 @@ export default {
params.referrerId = this.orderObj.userId
params.remark = this.orderObj.deafeatReason
params.defeatOrderTime = this.orderObj.createDate + ' 00:00:00'
params.payee = 0
console.log(params, 'rucan')
uni.showLoading({
title: '提交中...',
......@@ -442,19 +428,171 @@ export default {
}
}, 300),
// 获取 销售顾问列表
async getEmployeeList() {
const { userInfo, orderObj } = this
const { shopMerchantId, sceneType, merchantId } = userInfo,
data = await uni.$api.popupApi.getEmployeeList({
merchantId: orderObj.idKey == 'sellerUserId' ? merchantId : shopMerchantId,
sceneList: orderObj.idKey == 'sellerUserId' ? '' : [sceneType]
// 获取商品列表数据
getGoodsProduct() {
let { default4SStoreInfo } = this.userInfo
uni.$api.equityApi
.quotationGoodsList({
merchantId: default4SStoreInfo.merchantId,
suitCarPrice: ''
})
if (data && data.length) {
this.employeeList = data
// this.$set(this.orderObj, 'employeeName', data[0].staffName)
// this.orderObj.userId = data[0].uuid
.then(data => {
data = data.map(ele => {
if (ele.goods) {
let item = ele.goods
ele.goods = {
...item,
goodsId: item.merchantGoodsId,
// goodsNameAlias: item.upgradeGoodsAlias,
goodsNameAlias: item.goodsAlias || item.goodsNameAlias,
appreciation: item?.appreciation,
goodsName: item?.upgradeGoodsName,
quotationGoodsServiceItemsRelationDTOList: item?.upgradeGoodsServiceItemsList,
titlePictureUrl: item.goodsInfo?.thumbUrl
}
}
if (ele.packageGoods) {
let item = ele.packageGoods
item.goodsList = item.goodsList.map(ele => {
// console.log(ele, '2222');
let obj = {
packageId: item.packageCode,
packageName: item.packageName,
packageNameAlias: item.packageAlias || item.packageNameAlias,
goodsId: ele.merchantGoodsId || ele.upgradeGoodsId,
goodsName: ele.upgradeGoodsName || ele.goodsName,
goodsNameAlias: ele.goodsAlias || ele.goodsNameAlias,
// shopMinPrice: item.shopMinPrice,
goodsPrice: this.multipliedByHundred(ele.price),
sellPrice: ele.sellPrice
}
return obj
// ele.push(obj);
})
ele.packageGoods.sellPrice = item.goodsList.reduce((pre, item) => {
pre = NP.plus(pre, item.sellPrice)
return pre
}, 0)
}
return ele
})
console.log(data, 'data')
this.setDefailtInfo(data)
})
.catch(err => {
console.log(err)
})
},
// 处理默认隐藏信息
setDefailtInfo(data) {
let vdQuotationGoodsList = []
if (Array.isArray(data)) {
let item = data[0]
if (item.goods) {
item = item.goods
const obj = {
goodsId: item.merchantGoodsId,
goodsName: item.goodsName,
goodsNameAlias: item.goodsAlias || item.goodsNameAlias,
// shopMinPrice: item.shopMinPrice,
goodsPrice: this.multipliedByHundred(item.sellPrice)
}
// pre.push(obj);
item = obj
vdQuotationGoodsList.push(item)
}
if (item.packageGoods) {
let packageGoods = item.packageGoods
item = item.packageGoods
item = item.goodsList.map(ele => {
console.log(ele, '2222')
let obj = {
packageId: packageGoods.packageCode,
packageName: packageGoods.packageName,
packageNameAlias: packageGoods.packageAlias || pachageGoods.packageNameAlias,
goodsId: ele.goodsId,
goodsName: ele.goodsName,
goodsNameAlias: ele.goodsNameAlias,
// shopMinPrice: item.shopMinPrice,
goodsPrice: this.multipliedByHundred(ele.sellPrice)
}
// pre.push(obj);
// item = obj
return obj
})
// item.
vdQuotationGoodsList = item
}
// let item = {
// goodsId: firstItem.goodsId,
// goodsName: firstItem.goodsName,
// goodsNameAlias: firstItem.goodsNameAlias,
// goodsPrice: NP.times(100, firstItem.sellPrice),
// }
console.log(item, 'firstItem')
}
let { default4SStoreInfo } = this.userInfo
const msg = {
total: 1,
mode: 1,
check: true,
insurancePrice: 0,
merchantId4s: default4SStoreInfo.merchantId,
merchantName4s: default4SStoreInfo.merchantName,
minEquityPrice: 0,
payType: 1,
paymentDocList: [],
quotedPriceUpdate: 0,
referrer: '', //推荐人,
referrerId: '', //
transactionNo: '',
vdQuotationGoodsList,
owner: {
ageRange: '',
carBrand: '',
carBrandId: '',
carChildsBrandId: '',
carChildsBrandName: '',
carColor: '',
carSeriesId: '',
carSeriesName: '',
carVin: '',
certificateNo: '',
city: '',
companion: '',
confirmStatus: false,
owner: '', //客户姓名
ownerGender: '',
phone: '', //客户手机号
price: '',
salesType: 0,
saveStatus: false,
seat: 5
},
defeatOrder: true
}
this.defaultMsg = msg
},
// 乘以100保留两位小数点
multipliedByHundred: str => {
let floatVal = parseFloat(str)
if (isNaN(floatVal)) {
return 0
}
floatVal = Math.round(str * 10000) / 100
let strVal = floatVal.toString()
let searchVal = strVal.indexOf('.')
if (searchVal < 0) {
searchVal = strVal.length
strVal += '.'
}
while (strVal.length <= searchVal + 2) {
strVal += '0'
}
return parseFloat(strVal)
},
reasonClick(text) {
......
......@@ -118,13 +118,24 @@
</view>
<NoticePopup ref="notice" title="提示" text="是否撤销该笔客户工单,撤销后客户工单为「已撤销」状态,不再统计订单数和订单金额。" type="warning"></NoticePopup>
<ContractPopup ref="contractPopupRef" @onConfirm="onConfirm"></ContractPopup>
<PublishPopup ref="defeatOrderPopup" popupClass="defeatOrderPopup" type="center" :showClose="true" :isMaskClick="false" title="战败原因">
<template #content>
<view class="defeat-order-box modatcontent">
<textarea class="defeat-textarea" placeholder="请填写战败原因" maxlength="15" v-model="textareaValue" />
</view>
</template>
<template #footer>
<view class="footer-box flex justify-center">
<view class="cancle-btn btn" @click.stop="cancelSelection">取消</view>
<view class="sure-btn btn" @click.stop="confirmSelection">确认</view>
</view>
</template>
</PublishPopup>
</view>
</template>
<script>
import order_mixins from '../../order_mixins.js'
import { interceptionMixin } from '@/mixin/index'
import utils from '@/utils/utils'
import { checkDailyReport, showNextModal } from '@/utils/modalUtils'
import PublishPopup from '@/components/PublishPopup.vue'
import NoticePopup from '@/components/NoticePopup.vue'
import ContractPopup from './ContractPopup.vue'
......@@ -380,7 +391,8 @@ export default {
3: '去处理',
'-1': '去报价',
5: '去处理'
}
},
textareaValue: ''
}
},
mounted() {
......@@ -419,6 +431,7 @@ export default {
break
case 'defeat':
// 处理战败
this.defeatOrder()
break
case 'revoke':
// 处理撤销
......@@ -468,7 +481,11 @@ export default {
},
//上传协议
uploadContract() {
this.$refs.contractPopupRef.open({})
this.$refs.contractPopupRef.open(this.orderCardDetail)
},
//战败
defeatOrder() {
this.$refs.defeatOrderPopup.open(this.orderCardDetail)
},
showRefundAlert(type) {
const text = type == 'error' ? '订单已发起退款,禁止标记为错误工单!如需标记错误请联系总部运营。' : '订单已发起退款,禁止撤销!如需撤销请联系总部运营。'
......@@ -508,6 +525,31 @@ export default {
}
})
},
confirmSelection() {
if (this.textareaValue) {
uni.$api.equityApi
.updateOrderStatus({
id: this.orderCardDetail.id,
orderStatus: -1,
remark: this.textareaValue
})
.then(res => {
uni.showToast({
title: '提交成功',
icon: 'none'
})
setTimeout(() => {
this.$emit('refresh')
// _this.getList();
}, 500)
})
} else {
uni.showToast({
title: '内容不能为空',
icon: 'none'
})
}
},
onConfirm(val) {
console.log(val)
let urls = []
......@@ -568,16 +610,19 @@ export default {
</script>
<style lang="scss" scoped>
// Popup样式
::v-deep .recordOrderPopup .uni-popup__wrapper {
::v-deep .defeatOrderPopup .uni-popup__wrapper {
position: relative;
border-radius: toRpx(32);
opacity: 1;
width: toRpx(848);
height: toRpx(968);
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
background-color: #fff !important;
.popup-top-box {
text-align: left;
padding: toRpx(48) toRpx(64);
border-radius: toRpx(32) toRpx(32) 0 0;
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
&-title {
color: #1a1a1a;
font-size: toRpx(40);
......@@ -644,6 +689,17 @@ export default {
margin-left: toRpx(32);
}
}
.defeat-textarea {
height: toRpx(568);
border-radius: toRpx(16);
background: #f5f7fa;
width: 100%;
padding: toRpx(24);
box-sizing: border-box;
.uni-input-wrapper {
background: #f5f7fa;
}
}
}
.order-card {
padding: toRpx(36) toRpx(32);
......
......@@ -119,6 +119,9 @@ export default {
mounted() {
uni.$track.add({ eventCode: 'app_order_management' })
this.localUserInfo = uni.$storage.get('userInfo') || {}
if (!this.localUserInfo.isSuper && this.localUserInfo.loginRole != 3 && this.localUserInfo?.loginRole != 6) {
this.searchObj.transferIds = [this.localUserInfo.uuid]
}
this.search()
},
methods: {
......@@ -177,15 +180,12 @@ export default {
},
getStatByStatus() {
const localUserInfo = uni.$storage.get('userInfo')
console.log(this.searchObj)
console.log(this.searchObj, 'this.searchObj')
let params = {
customerName: this.customerName,
merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj
}
if (!localUserInfo.isSuper && localUserInfo.loginRole != 3 && localUserInfo?.loginRole != 6) {
params.transferIds = [localUserInfo.uuid]
}
if (params?.zyPayStatus == '1') params.orderStatus = 7
uni.$api.equityApi
.orderStatistics(params)
......@@ -252,9 +252,7 @@ export default {
merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj
}
if (!localUserInfo.isSuper && localUserInfo.loginRole != 3 && localUserInfo?.loginRole != 6) {
params.transferIds = [localUserInfo.uuid]
}
if (params?.zyPayStatus == '1') params.orderStatus = 7
// if (staffUuid) {
// params.transferIds = [staffUuid]
// } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!