Commit 72e84500 by cen

feat: 新增战败原因

1 parent f1450b49
......@@ -126,5 +126,31 @@ module.exports = {
projectName: 'boutique',
...data
})
},
/** 根据商户号商品id获取可选升级商品列表 */
quotationGoodsList(data) {
return http.post({
method: 'dj.api.smartcarlife.quotationGoods.list',
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
})
}
}

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] || '未知文件'
},
}
}
......
......@@ -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!