Commit 4f0bc783 by 胡悦

Merge branch 'V4.56.0' of http://192.168.3.233:8090/glsx/gl_tape into V4.56.0

2 parents a32cf930 fc6890a0
...@@ -325,5 +325,17 @@ module.exports = { ...@@ -325,5 +325,17 @@ module.exports = {
/** 战败订单批量补录 */ /** 战败订单批量补录 */
notUpgradeOrder(data) { notUpgradeOrder(data) {
return http.post({ method: 'dj.api.smartcarlife.order.notUpgrade.batchInsert', projectName: 'boutique', ...data }) return http.post({ method: 'dj.api.smartcarlife.order.notUpgrade.batchInsert', projectName: 'boutique', ...data })
},
/**改变支付订单状态 */
createPayOrder(data) {
return http.post({ method: 'dj.api.smartcarlife.payOrder.create', projectName: 'boutique', ...data })
},
/** 质保价格编辑接口 */
modifyWarrantyPrice(data) {
return http.post({
method: 'dj.api.smartcarlife.customer.warrantyCard.modifyWarrantyPrice',
projectName: 'boutique',
...data
})
} }
} }

2.61 MB | W: | H:

2.61 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -58,22 +58,15 @@ ...@@ -58,22 +58,15 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import popupmixin from './popupmixin'
export default { export default {
mixins: [popupmixin],
name: 'CarModelList', name: 'CarModelList',
inject: ['userInfo'],
data () { data () {
return { return {
list: [],
currentId: '',
searchList: [],
letter: 'A', letter: 'A',
searchStatus: false,
} }
}, },
props: {
params: Object,
data: Object,
},
mounted () { mounted () {
}, },
methods: { methods: {
...@@ -82,7 +75,7 @@ export default { ...@@ -82,7 +75,7 @@ export default {
{ cacheData } = params { cacheData } = params
this.currentId = '' this.currentId = ''
if (cacheData && cacheData.length) { if (cacheData && cacheData.length) {
this.initCarList(cacheData) this.initData(cacheData)
if (searchValue) this.handleSearch(searchValue) if (searchValue) this.handleSearch(searchValue)
return return
} }
...@@ -90,13 +83,9 @@ export default { ...@@ -90,13 +83,9 @@ export default {
data = await uni.$api.popupApi.getMerchantCarBrandList({ data = await uni.$api.popupApi.getMerchantCarBrandList({
merchantId: shopMerchantId merchantId: shopMerchantId
}) })
if (data && data.length) { if (data && data.length) this.updateParams(params, data)
this.initCarList(data)
params.cacheData = data
this.$emit('update:params', params)
}
}, },
initCarList (carData) { initData (carData) {
let { params: { idKey }, data: { customer } } = this, let { params: { idKey }, data: { customer } } = this,
letterList = Array.from(new Set([...carData.map((e) => e.letter)])), letterList = Array.from(new Set([...carData.map((e) => e.letter)])),
carModelList = letterList.map(e => { carModelList = letterList.map(e => {
......
...@@ -48,22 +48,15 @@ ...@@ -48,22 +48,15 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import popupmixin from './popupmixin'
export default { export default {
mixins: [popupmixin],
name: 'CouponList', name: 'CouponList',
inject: ['userInfo'],
data () { data () {
return { return {
list: [],
currentId: '',
searchList: [],
searchStatus: false,
customerCouponList: [] customerCouponList: []
} }
}, },
props: {
params: Object,
data: Object,
},
watch: { watch: {
'data.customer.customerPhone': { 'data.customer.customerPhone': {
handler (val) { handler (val) {
...@@ -81,7 +74,7 @@ export default { ...@@ -81,7 +74,7 @@ export default {
{ cacheData } = params { cacheData } = params
this.currentId = '' this.currentId = ''
if (cacheData && cacheData.length) { if (cacheData && cacheData.length) {
this.initCouponList(cacheData) this.initData(cacheData)
if (searchValue) this.handleSearch(searchValue) if (searchValue) this.handleSearch(searchValue)
return return
} }
...@@ -91,13 +84,9 @@ export default { ...@@ -91,13 +84,9 @@ export default {
yqMerchantId: merchantId, yqMerchantId: merchantId,
orderByType: 9 orderByType: 9
}) })
if (data && data.length) { if (data && data.length) this.updateParams(params, data)
this.initCouponList(data)
params.cacheData = data
this.$emit('update:params', params)
}
}, },
initCouponList (data) { initData (data) {
let couponTypeList = Array.from(new Set([...data.map((e) => e.couponInfo.couponType)])), let couponTypeList = Array.from(new Set([...data.map((e) => e.couponInfo.couponType)])),
couponList = couponTypeList.map((e, index) => { couponList = couponTypeList.map((e, index) => {
let list = []; let list = [];
...@@ -232,7 +221,8 @@ export default { ...@@ -232,7 +221,8 @@ export default {
} }
} }
.disabled { .disabled {
opacity: 0.5; border: 2rpx solid #dce0e666;
color: #3333331a;
} }
.active { .active {
border-color: #2c66f7; border-color: #2c66f7;
......
...@@ -14,19 +14,14 @@ ...@@ -14,19 +14,14 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import popupmixin from './popupmixin'
export default { export default {
mixins: [popupmixin],
name: 'DiversionMerchant', name: 'DiversionMerchant',
inject: ['userInfo'],
data () { data () {
return { return {
list: [],
currentId: ''
} }
}, },
props: {
params: Object,
data: Object,
},
mounted () { mounted () {
}, },
methods: { methods: {
...@@ -35,19 +30,17 @@ export default { ...@@ -35,19 +30,17 @@ export default {
{ cacheData } = params { cacheData } = params
this.currentId = '' this.currentId = ''
if (cacheData && cacheData.length) { if (cacheData && cacheData.length) {
this.$emit('onComplete') this.initData(cacheData)
this.list = cacheData
return return
} }
const data = await uni.$api.popupApi.getDiversionMerchantRef({ const data = await uni.$api.popupApi.getDiversionMerchantRef({
merchantId: shopMerchantId merchantId: shopMerchantId
}) })
if (data && data.length) { if (data && data.length) this.updateParams(params, data)
this.$emit('onComplete') },
initData (data) {
this.list = data this.list = data
params.cacheData = data this.$emit('onComplete')
this.$emit('update:params', params)
}
}, },
choose (i) { choose (i) {
this.currentId = i.subMerchantId this.currentId = i.subMerchantId
......
...@@ -14,19 +14,15 @@ ...@@ -14,19 +14,15 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import popupmixin from './popupmixin'
export default { export default {
mixins: [popupmixin],
name: 'EmployeeList', name: 'EmployeeList',
inject: ['userInfo'], inject: ['userInfo'],
data () { data () {
return { return {
list: [],
currentId: ''
} }
}, },
props: {
params: Object,
data: Object
},
mounted () { mounted () {
}, },
methods: { methods: {
...@@ -35,8 +31,7 @@ export default { ...@@ -35,8 +31,7 @@ export default {
{ cacheData } = params { cacheData } = params
this.currentId = '' this.currentId = ''
if (!search && cacheData && cacheData.length) { if (!search && cacheData && cacheData.length) {
this.$emit('onComplete') this.initData(cacheData)
this.list = cacheData
return return
} }
const { shopMerchantId, sceneType, merchantId } = userInfo, const { shopMerchantId, sceneType, merchantId } = userInfo,
...@@ -45,12 +40,11 @@ export default { ...@@ -45,12 +40,11 @@ export default {
sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType], sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType],
name: searchValue name: searchValue
}) })
if (data && data.length) { if (data && data.length) this.updateParams(params, data)
this.$emit('onComplete') },
initData(data){
this.list = data this.list = data
params.cacheData = data this.$emit('onComplete')
this.$emit('update:params', params)
}
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
this.list = [] this.list = []
......
...@@ -22,23 +22,14 @@ ...@@ -22,23 +22,14 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import popupmixin from './popupmixin'
export default { export default {
mixins: [popupmixin],
name: 'GoodsList', name: 'GoodsList',
inject: ['userInfo', 'baseConfigData'],
data () { data () {
return { return {
list: [],
currentIds: [],
chooseList: [],
searchStatus: false,
searchList: [],
} }
}, },
props: {
params: Object,
data: [Object, Array],
dataKey: String
},
mounted () { mounted () {
}, },
methods: { methods: {
...@@ -48,20 +39,16 @@ export default { ...@@ -48,20 +39,16 @@ export default {
this.currentIds = [] this.currentIds = []
this.chooseList = [] this.chooseList = []
if (cacheData && cacheData.length) { if (cacheData && cacheData.length) {
this.list = this.initGoodsList(cacheData) this.initData(cacheData)
if (searchValue) this.handleSearch(searchValue) if (searchValue) this.handleSearch(searchValue)
return return
} }
const { shopMerchantId, sceneType } = userInfo, const { shopMerchantId, sceneType } = userInfo,
response = await uni.$api.popupApi.getGoodsList({ data = await uni.$api.popupApi.getGoodsList({
merchantId: shopMerchantId, merchantId: shopMerchantId,
sceneType sceneType
}) })
if (response && response.length) { if (data && data.length) this.updateParams(params, data)
this.list = this.initGoodsList(response)
params.cacheData = response
this.$emit('update:params', params)
}
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
if (!searchValue) this.searchStatus = false if (!searchValue) this.searchStatus = false
...@@ -80,9 +67,9 @@ export default { ...@@ -80,9 +67,9 @@ export default {
this.searchStatus = true this.searchStatus = true
} }
}, },
initGoodsList (goodsData) { initData (goodsData) {
let { goodsType } = this.params, let { goodsType } = this.params,
{ data ,dataKey } = this, { data, dataKey } = this,
arr = [] arr = []
goodsData.map(val => { goodsData.map(val => {
if (val.goodsFlag == 1) { if (val.goodsFlag == 1) {
...@@ -100,7 +87,7 @@ export default { ...@@ -100,7 +87,7 @@ export default {
this.chooseList.push(e) this.chooseList.push(e)
}) })
this.$emit('onComplete') this.$emit('onComplete')
return arr this.list = arr
}, },
choose (i) { choose (i) {
let { goodsId } = i.goods, let { goodsId } = i.goods,
......
<template> <template>
<view class="goods-list"> <view class="goods-list">
<!-- <template v-if="list.length"> --> <template v-if="params.loadComplete">
<template v-for="(item, index) in (searchStatus ? searchList : list)"> <template v-if="listData.length">
<template v-for="(item, index) in listData">
<view <view
:key="index" :key="index"
@click="choose(item)" @click="choose(item)"
...@@ -33,29 +34,21 @@ ...@@ -33,29 +34,21 @@
</view> </view>
</view> </view>
</template> </template>
<!-- </template> --> </template>
</template>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import NP from 'number-precision' import NP from 'number-precision'
import popupmixin from './popupmixin'
export default { export default {
mixins: [popupmixin],
name: 'PackageList', name: 'PackageList',
inject: ['userInfo', 'baseConfigData'],
data () { data () {
return { return {
list: [],
currentIds: [],
chooseList: [],
searchStatus: false,
searchList: [],
} }
}, },
props: {
params: Object,
data: [Object, Array],
dataKey: String
},
mounted () { mounted () {
}, },
methods: { methods: {
...@@ -65,20 +58,16 @@ export default { ...@@ -65,20 +58,16 @@ export default {
this.currentIds = [] this.currentIds = []
this.chooseList = [] this.chooseList = []
if (cacheData && cacheData.length) { if (cacheData && cacheData.length) {
this.list = this.initGoodsList(cacheData) this.initData(cacheData)
if (searchValue) this.handleSearch(searchValue) if (searchValue) this.handleSearch(searchValue)
return return
} }
const { shopMerchantId, sceneType } = userInfo, const { shopMerchantId, sceneType } = userInfo,
response = await uni.$api.popupApi.getGoodsList({ data = await uni.$api.popupApi.getGoodsList({
merchantId: shopMerchantId, merchantId: shopMerchantId,
sceneType sceneType
}) })
if (response && response.length) { if (data && data.length) this.updateParams(params, data)
this.list = this.initGoodsList(response)
params.cacheData = response
this.$emit('update:params', params)
}
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
if (!searchValue) this.searchStatus = false if (!searchValue) this.searchStatus = false
...@@ -97,7 +86,7 @@ export default { ...@@ -97,7 +86,7 @@ export default {
this.searchStatus = true this.searchStatus = true
} }
}, },
initGoodsList (goodsData) { initData (goodsData) {
let { data, dataKey } = this, let { data, dataKey } = this,
arr = [] arr = []
goodsData.map(val => { goodsData.map(val => {
...@@ -115,7 +104,7 @@ export default { ...@@ -115,7 +104,7 @@ export default {
this.chooseList.push(e) this.chooseList.push(e)
}) })
this.$emit('onComplete') this.$emit('onComplete')
return arr this.list = arr
}, },
choose (i) { choose (i) {
let { packageCode } = i.packageGoods, let { packageCode } = i.packageGoods,
......
<template> <template>
<view class="goods-list"> <view class="goods-list">
<template v-for="(i, index) in (searchStatus ? searchList : list)"> <template v-if="params.loadComplete">
<template v-if="listData.length">
<template v-for="(i, index) in listData">
<view <view
:key="index" :key="index"
@click.stop="choose(i ,index)" @click.stop="choose(i ,index)"
...@@ -64,14 +66,21 @@ ...@@ -64,14 +66,21 @@
<view class="label"> <view class="label">
{{specific.specificationName}} {{specific.specificationName}}
</view> </view>
<view class="value"> <view class="value flex">
<template v-if="specific.value"> <template v-if="specific.value">
{{specific.value}} {{specific.value}}
</template> </template>
<text <text
class="placeholder" class="placeholder flex"
v-else v-else
>请选择</text> >
请选择
</text>
<uni-icons
type="right"
size="14"
class="arrow"
/>
</view> </view>
</view> </view>
</picker> </picker>
...@@ -81,28 +90,21 @@ ...@@ -81,28 +90,21 @@
</template> </template>
</view> </view>
</template> </template>
</template>
</template>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import popupmixin from './popupmixin'
export default { export default {
mixins: [popupmixin],
name: 'SkuGoodsList', name: 'SkuGoodsList',
inject: ['userInfo', 'baseConfigData'],
data () { data () {
return { return {
list: [],
currentIds: [],
chooseList: [],
searchStatus: false,
searchList: [],
} }
}, },
props: {
params: Object,
data: [Object, Array],
dataKey: String
},
mounted () { mounted () {
}, },
methods: { methods: {
...@@ -112,20 +114,16 @@ export default { ...@@ -112,20 +114,16 @@ export default {
this.currentIds = [] this.currentIds = []
this.chooseList = [] this.chooseList = []
if (cacheData && cacheData.length) { if (cacheData && cacheData.length) {
this.list = this.initGoodsList(cacheData) this.initData(cacheData)
if (searchValue) this.handleSearch(searchValue) if (searchValue) this.handleSearch(searchValue)
return return
} }
const { shopMerchantId, sceneType } = userInfo, const { shopMerchantId, sceneType } = userInfo,
response = await uni.$api.popupApi.getGoodsList({ data = await uni.$api.popupApi.getGoodsList({
merchantId: shopMerchantId, merchantId: shopMerchantId,
sceneType sceneType
}) })
if (response && response.length) { if (data && data.length) this.updateParams(params, data)
this.list = this.initGoodsList(response)
params.cacheData = response
this.$emit('update:params', params)
}
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
if (!searchValue) this.searchStatus = false if (!searchValue) this.searchStatus = false
...@@ -135,7 +133,12 @@ export default { ...@@ -135,7 +133,12 @@ export default {
arr = [] arr = []
goodsList.map(c => { goodsList.map(c => {
let name = '' let name = ''
if (c.goodsFlag == 3 && c.packageGoods) name = c.packageGoods.packageName || c.packageGoods.packageAlias if (c.goodsFlag == 1 && c.goods) {
name = c.goods.goodsAlias || c.goods.upgradeGoodsName || c.goods.goodsName || ''
}
if (c.goodsFlag == 2 && c.multipleSpecificationsGoods) {
name = c.multipleSpecificationsGoods.baseGoodsName
}
if (name.indexOf(searchValue) != -1) { if (name.indexOf(searchValue) != -1) {
arr.push(c) arr.push(c)
} }
...@@ -144,7 +147,7 @@ export default { ...@@ -144,7 +147,7 @@ export default {
this.searchStatus = true this.searchStatus = true
} }
}, },
initGoodsList (goodsData) { initData (goodsData) {
let { data, dataKey } = this, let { data, dataKey } = this,
arr = [] arr = []
goodsData.map((val) => { goodsData.map((val) => {
...@@ -183,8 +186,8 @@ export default { ...@@ -183,8 +186,8 @@ export default {
this.chooseList.push(e) this.chooseList.push(e)
} }
}) })
this.list = arr
this.$emit('onComplete') this.$emit('onComplete')
return arr
}, },
async choose (i, index) { async choose (i, index) {
if (i.goodsFlag == 2) { if (i.goodsFlag == 2) {
...@@ -462,6 +465,9 @@ export default { ...@@ -462,6 +465,9 @@ export default {
margin-left: auto; margin-left: auto;
max-width: 50%; max-width: 50%;
flex-shrink: 0; flex-shrink: 0;
.arrow {
margin-left: 4rpx;
}
} }
&:last-of-type { &:last-of-type {
border: none; border: none;
......
export default {
inject: ['userInfo', 'baseConfigData'],
data () {
return {
list: [],
searchStatus: false,
searchList: [],
chooseList: [],
currentId: '',
currentIds: [],
}
},
props: {
params: Object,
data: [Object, Array],
dataKey: String
},
computed: {
listData () {
return this.searchStatus ? this.searchList : this.list
},
noData () {
return !this.listData.length
}
},
watch: {
noData: {
handler (val) {
let { params } = this
params.noData = val
this.updateParams(params)
},
deep: true
}
},
methods: {
updateParams (params, data) {
if (data) {
this.initData && this.initData(data)
params.cacheData = data
}
this.$emit('update:params', params)
}
}
}
\ No newline at end of file \ No newline at end of file
...@@ -21,39 +21,61 @@ const componentConfig = { ...@@ -21,39 +21,61 @@ const componentConfig = {
name: 'EmployeeList', name: 'EmployeeList',
title: '销售顾问/录单员', title: '销售顾问/录单员',
placeholder: '请输入姓名', placeholder: '请输入姓名',
idKey: 'userId' idKey: 'userId',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
1: { 1: {
name: 'EmployeeList', name: 'EmployeeList',
title: '交付专员', title: '交付专员',
placeholder: '请输入姓名', placeholder: '请输入姓名',
nullTips: '请选择交付专员', nullTips: '请选择交付专员',
idKey: 'deliveryUserId' idKey: 'deliveryUserId',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
2: { 2: {
name: 'DiversionMerchant', name: 'DiversionMerchant',
title: '二级流量方', title: '二级流量方',
hideSearch: true, hideSearch: true,
idKey: 'subShopMerchantId' idKey: 'subShopMerchantId',
cacheData: [],
loadComplete: false
}, },
3: { 3: {
name: 'EmployeeList', name: 'EmployeeList',
title: '转化人员', title: '转化人员',
placeholder: '请输入姓名', placeholder: '请输入姓名',
idKey: 'sellerUserId', idKey: 'sellerUserId',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
4: { 4: {
name: 'CarModelList', name: 'CarModelList',
title: '选择车型', title: '选择车型',
placeholder: '查找', placeholder: '查找',
idKey: 'carSeriesId' idKey: 'carSeriesId',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
5: { 5: {
name: 'CouponList', name: 'CouponList',
title: '选择礼券', title: '选择礼券',
placeholder: '查找', placeholder: '查找',
idKey: 'customerCouponCode', idKey: 'customerCouponCode',
nullTips: '优惠券不能为空' nullTips: '优惠券不能为空',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
6: { 6: {
name: 'GoodsList', name: 'GoodsList',
...@@ -61,7 +83,11 @@ const componentConfig = { ...@@ -61,7 +83,11 @@ const componentConfig = {
placeholder: '请输入名称', placeholder: '请输入名称',
idKey: 'goodsId', idKey: 'goodsId',
nullTips: '请勾选商品', nullTips: '请勾选商品',
goodsType: [1]//前档 goodsType: [1],//前档
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
7: { 7: {
name: 'GoodsList', name: 'GoodsList',
...@@ -69,7 +95,11 @@ const componentConfig = { ...@@ -69,7 +95,11 @@ const componentConfig = {
placeholder: '请输入名称', placeholder: '请输入名称',
idKey: 'goodsId', idKey: 'goodsId',
nullTips: '请勾选商品', nullTips: '请勾选商品',
goodsType: [2] // 前侧窗玻璃 goodsType: [2], // 前侧窗玻璃
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
8: { 8: {
name: 'GoodsList', name: 'GoodsList',
...@@ -77,7 +107,11 @@ const componentConfig = { ...@@ -77,7 +107,11 @@ const componentConfig = {
placeholder: '请输入名称', placeholder: '请输入名称',
idKey: 'goodsId', idKey: 'goodsId',
nullTips: '请勾选商品', nullTips: '请勾选商品',
goodsType: [3] // 后侧窗玻璃 goodsType: [3], // 后侧窗玻璃
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
9: { 9: {
name: 'GoodsList', name: 'GoodsList',
...@@ -85,7 +119,11 @@ const componentConfig = { ...@@ -85,7 +119,11 @@ const componentConfig = {
placeholder: '请输入名称', placeholder: '请输入名称',
idKey: 'goodsId', idKey: 'goodsId',
nullTips: '请勾选商品', nullTips: '请勾选商品',
goodsType: [4] // 后档 goodsType: [4],// 后档
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
10: { 10: {
name: 'GoodsList', name: 'GoodsList',
...@@ -93,26 +131,38 @@ const componentConfig = { ...@@ -93,26 +131,38 @@ const componentConfig = {
placeholder: '请输入名称', placeholder: '请输入名称',
idKey: 'goodsId', idKey: 'goodsId',
nullTips: '请勾选商品', nullTips: '请勾选商品',
goodsType: [5, 6, 7] // 天窗 goodsType: [5, 6, 7],// 天窗
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
11: { 11: {
name: 'PackageList', name: 'PackageList',
title: '选择套餐', title: '选择套餐',
placeholder: '查找', placeholder: '查找',
nullTips: '请勾选套餐', nullTips: '请勾选套餐',
idKey: 'packageCode' idKey: 'packageCode',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
12: { 12: {
name: 'SkuGoodsList', name: 'SkuGoodsList',
title: '选择商品', title: '选择商品',
nullTips: '请勾选商品', nullTips: '请勾选商品',
placeholder: '查找', placeholder: '查找',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}, },
13: { 13: {
name: 'DateTime', name: 'DateTime',
title: '选择时间', title: '选择时间',
hideSearch: true, hideSearch: true,
loadComplete: false
} }
} }
export default { componentConfig } export default { componentConfig }
\ No newline at end of file \ No newline at end of file
...@@ -19,14 +19,14 @@ ...@@ -19,14 +19,14 @@
></uni-icons> ></uni-icons>
</view> </view>
</view> </view>
<template v-if="!componentObject.hideSearch"> <template v-if="!componentObject[popupType].hideSearch">
<view class="popup-search"> <view class="popup-search">
<input <input
class="input" class="input"
type="text" type="text"
:placeholder="componentObject.placeholder || '请输入'" :placeholder="componentObject[popupType].placeholder || '请输入'"
placeholder-class="placeholder" placeholder-class="placeholder"
v-model="componentObject.searchValue" v-model="componentObject[popupType].searchValue"
confirm-type="search" confirm-type="search"
@confirm="handleSearch" @confirm="handleSearch"
> >
...@@ -37,29 +37,33 @@ ...@@ -37,29 +37,33 @@
<uni-icons <uni-icons
type="closeempty" type="closeempty"
size="16" size="16"
v-if="componentObject.searchValue" v-if="componentObject[popupType].searchValue"
></uni-icons> ></uni-icons>
</view> </view>
</view> </view>
</template> </template>
<view :class="['popup-body',{ 'hide-search' :componentObject.hideSearch}]"> <view :class="['popup-body',{ 'hide-search' :componentObject[popupType].hideSearch}]">
<scroll-view <scroll-view
scroll-y scroll-y
:class="['popup-scroll-view',{show:loadComplete}]" :class="['popup-scroll-view',{show:componentObject[popupType].loadComplete}]"
> >
<component <component
:is="componentObject.name" :is="componentObject[popupType].name"
:params.sync="componentObject" :params.sync="componentObject[popupType]"
:data="data" :data="data"
:dataKey="dataKey" :dataKey="dataKey"
ref="componentRef" ref="componentRef"
@choose="chooseContent = $event" @choose="chooseContent = $event"
@openSkuPopup="openSkuPopup" @openSkuPopup="openSkuPopup"
@onComplete="loadComplete = true" @onComplete="componentObject[popupType].loadComplete = true"
@updateCacheData="updateCacheData"
></component> ></component>
<template v-if="componentObject[popupType].noData">
<view class="nothing flex">暂无数据</view>
</template>
</scroll-view> </scroll-view>
<image <image
v-if="!loadComplete" v-if="!componentObject[popupType].loadComplete"
class="loading" class="loading"
src="../../assets/images/common/loadding.gif" src="../../assets/images/common/loadding.gif"
/> />
...@@ -127,14 +131,12 @@ export default { ...@@ -127,14 +131,12 @@ export default {
return { return {
position: 'bottom', position: 'bottom',
chooseContent: null, chooseContent: null,
componentObject: null, componentObject: config.componentConfig,
loadComplete: false
} }
}, },
watch: { watch: {
popupType: { popupType: {
handler (val) { handler (val) {
this.componentObject = config.componentConfig[this.popupType]
if (val == 11 || val == 12) this.position = 'right' if (val == 11 || val == 12) this.position = 'right'
else this.position = 'bottom' else this.position = 'bottom'
}, },
...@@ -143,9 +145,15 @@ export default { ...@@ -143,9 +145,15 @@ export default {
}, },
externalData: { externalData: {
handler (val) { handler (val) {
if (val && this.componentObject) this.componentObject.cacheData = val if (val) {
}
if (val && val.length && this.componentObject[this.popupType]) {
this.componentObject[this.popupType].cacheData = val
}
}, },
deep: true, deep: true,
immediate: true
} }
}, },
computed: { computed: {
...@@ -170,6 +178,7 @@ export default { ...@@ -170,6 +178,7 @@ export default {
this.initPopupData() this.initPopupData()
}, },
cancel () { cancel () {
console.log()
this.$refs.popup.close() this.$refs.popup.close()
this.$emit('cancel') this.$emit('cancel')
}, },
...@@ -180,7 +189,7 @@ export default { ...@@ -180,7 +189,7 @@ export default {
initPopupData () { initPopupData () {
let componentRef = this.componentRef() let componentRef = this.componentRef()
if (!componentRef) setTimeout(this.initPopupData, .1e3) if (!componentRef) setTimeout(this.initPopupData, .1e3)
else componentRef.getList && componentRef.getList(this.componentObject.searchValue) else componentRef.getList && componentRef.getList(this.componentObject[this.popupType].searchValue)
}, },
handleSearch () { handleSearch () {
let componentRef = this.componentRef() let componentRef = this.componentRef()
...@@ -188,7 +197,7 @@ export default { ...@@ -188,7 +197,7 @@ export default {
title: '请稍后再试', title: '请稍后再试',
icon: 'none' icon: 'none'
}) })
else componentRef.handleSearch(this.componentObject.searchValue) else componentRef.handleSearch(this.componentObject[this.popupType].searchValue)
}, },
confirm () { confirm () {
try { try {
...@@ -197,14 +206,14 @@ export default { ...@@ -197,14 +206,14 @@ export default {
chooseContent = this.componentRef().getResult() chooseContent = this.componentRef().getResult()
} }
if (chooseContent) { if (chooseContent) {
if(Array.isArray(chooseContent) && !chooseContent.length && componentObject.nullTips) throw componentObject.nullTips if (Array.isArray(chooseContent) && !chooseContent.length && componentObject[popupType].nullTips) throw componentObject.nullTips
this.$emit('onConfirm', { this.$emit('onConfirm', {
chooseContent, chooseContent,
popupType popupType
}) })
this.$refs.popup.close() this.$refs.popup.close()
} else { } else {
if (componentObject.nullTips) throw componentObject.nullTips if (componentObject[popupType].nullTips) throw componentObject[popupType].nullTips
} }
} catch (error) { } catch (error) {
uni.showToast({ uni.showToast({
...@@ -224,9 +233,9 @@ export default { ...@@ -224,9 +233,9 @@ export default {
}) })
}, },
clear () { clear () {
this.componentObject.searchValue = '' this.componentObject[this.popupType].searchValue = ''
this.handleSearch() this.handleSearch()
} },
} }
} }
</script> </script>
...@@ -335,6 +344,15 @@ export default { ...@@ -335,6 +344,15 @@ export default {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%); background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
} }
} }
.nothing{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2;
justify-content: center;
}
} }
.right-box { .right-box {
width: 46vw; width: 46vw;
......
...@@ -72,17 +72,33 @@ export default { ...@@ -72,17 +72,33 @@ export default {
} }
}, },
methods: { methods: {
open(callback) { open() {
this.$nextTick(() => {
console.log(this.$refs)
if (this.$refs.publishPopup) {
this.$refs.publishPopup.open() this.$refs.publishPopup.open()
}
})
return new Promise((resolve, reject) => {
this.resolve = resolve
this.reject = reject
})
}, },
change(e) { change(e) {
this.show = e.show this.show = e.show
}, },
closePopup() { closePopup() {
this.$refs.publishPopup.close() this.$refs.publishPopup.close()
if (this.reject) {
this.reject()
}
this.$emit('close') this.$emit('close')
}, },
confirm() { confirm() {
if (this.resolve) {
this.$refs.publishPopup.close()
this.resolve()
}
this.$emit('confirm') this.$emit('confirm')
} }
} }
......
...@@ -84,9 +84,9 @@ ...@@ -84,9 +84,9 @@
</view> </view>
</view> </view>
<!-- 施工技师 --> <!-- 施工技师 -->
<view class="construction-staff flex" v-if="orderCardDetail.constructionFlag == 'Y'"> <view class="construction-staff flex" v-if="orderCardDetail && orderCardDetail.constructionFlag == 'Y'">
<view class="staff-label">施工技师</view> <view class="staff-label">施工技师</view>
<view class="staff-value">111</view> <view class="staff-value">{{ orderCardDetail.technicianName }}</view>
</view> </view>
<PublishPopup ref="recordOrderPopup" popupClass="recordOrderPopup" type="center" :showClose="true" title="请选择录单入口"> <PublishPopup ref="recordOrderPopup" popupClass="recordOrderPopup" type="center" :showClose="true" title="请选择录单入口">
<template #content> <template #content>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<view class="sprite-icon icon-expiration"></view> <view class="sprite-icon icon-expiration"></view>
失效客户 失效客户
</view> </view>
<view class="modalbox cancle" :class="selectType == 4 ? 'act' : ''" @click.stop="changeType(4)"> <view class="modalbox cancle" v-if="orderCardDetail.constructionFlag !== 'Y' && orderCardDetail.selectPayType !== 1 && orderCardDetail.selectPayType !== 3 && orderCardDetail.selectPayType !== 4 && orderCardDetail.status !== 9" :class="selectType == 4 ? 'act' : ''" @click.stop="changeType(4)">
<view class="sprite-icon icon-revoke"></view> <view class="sprite-icon icon-revoke"></view>
撤销工单 撤销工单
</view> </view>
...@@ -136,9 +136,16 @@ export default { ...@@ -136,9 +136,16 @@ export default {
components: { components: {
PublishPopup PublishPopup
}, },
computed: {
payType() {
return order_mixins.data.payType || {}
},
status() {
return order_mixins.data.status || {}
}
},
data() { data() {
return { return {
...order_mixins.data,
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/', IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/',
isSettingExpiredTraffic: false, // 是否启用流量失效 isSettingExpiredTraffic: false, // 是否启用流量失效
selectType: 1, selectType: 1,
...@@ -181,9 +188,13 @@ export default { ...@@ -181,9 +188,13 @@ export default {
label: '工单时间', label: '工单时间',
key: 'orderTime' key: 'orderTime'
} }
] ],
localUserInfo: null
} }
}, },
mounted() {
this.localUserInfo = uni.$storage.get('userInfo')
},
methods: { methods: {
// 查看全部商品 // 查看全部商品
showAllGoodsList(e) { showAllGoodsList(e) {
...@@ -198,18 +209,18 @@ export default { ...@@ -198,18 +209,18 @@ export default {
// failureFlag 订单失效状态(Y:已失效,N:未失效) // failureFlag 订单失效状态(Y:已失效,N:未失效)
// console.log(e.currentTarget.dataset) // console.log(e.currentTarget.dataset)
// return // return
const userInfo = uni.$storage.get('userInfo')
if (userInfo.merchantAccountList && userInfo.merchantAccountList.length) { if (this.localUserInfo.merchantAccountList && this.localUserInfo.merchantAccountList.length) {
try { try {
userInfo.merchantAccountList.map(e => { this.localUserInfo.merchantAccountList.map(e => {
if (e == 6 || e == 8) throw true if (e == 6 || e == 8) throw true
}) })
} catch (error) { } catch (error) {
userInfo.merchantType = error this.localUserInfo.merchantType = error
} }
} }
userInfo.isMake = !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7) this.localUserInfo.isMake = !(this.localUserInfo?.isSuper || this.localUserInfo?.loginRole == 3 || this.localUserInfo?.loginRole == 5 || this.localUserInfo?.loginRole == 6 || this.localUserInfo?.loginRole == 7)
let { userType, isSuper, merchantType, isMake } = userInfo let { userType, isSuper, merchantType, isMake } = this.localUserInfo
console.log(item) console.log(item)
if (name == 'CreateOrder' || name == 'PremiumUpgrade') { if (name == 'CreateOrder' || name == 'PremiumUpgrade') {
if (merchantType && !isSuper && isMake) { if (merchantType && !isSuper && isMake) {
...@@ -246,16 +257,20 @@ export default { ...@@ -246,16 +257,20 @@ export default {
if ((!this.isSettingExpiredTraffic || scan) && this.selectType == 3) { if ((!this.isSettingExpiredTraffic || scan) && this.selectType == 3) {
this.selectType = 1 this.selectType = 1
} }
this.$nextTick(() => {
if (this.$refs.recordOrderPopup) {
this.$refs.recordOrderPopup.open() this.$refs.recordOrderPopup.open()
} else {
console.error('recordOrderPopup ref is not available')
}
})
}, },
// 获取轻改录单配置是否启用流量失效 // 获取轻改录单配置是否启用流量失效
getCreateOrderSetting() { getCreateOrderSetting() {
let userInfo = uni.$storage.get('userInfo') let merchantType = this.localUserInfo?.merchantAccountList.includes('6') || this.localUserInfo?.merchantAccountList.includes('8')
let merchantType = userInfo?.merchantAccountList.includes('6') || userInfo?.merchantAccountList.includes('8') if (merchantType && !this.localUserInfo?.isSuper && this.localUserInfo?.loginRole != 3 && this.localUserInfo?.userType == 2 && this.localUserInfo?.shopMerchantId) {
if (merchantType && !userInfo?.isSuper && userInfo?.loginRole != 3 && userInfo?.userType == 2 && userInfo?.shopMerchantId) { uni.$api.boutiqueApi.getServiceBaseInfo({ merchantId: this.localUserInfo?.shopMerchantId }).then(res => {
uni.$api.boutiqueApi.getServiceBaseInfo({ merchantId: userInfo?.shopMerchantId }).then(res => {
this.isSettingExpiredTraffic = res?.data?.trafficExpireFlag == 'Y' this.isSettingExpiredTraffic = res?.data?.trafficExpireFlag == 'Y'
}) })
} }
...@@ -270,8 +285,21 @@ export default { ...@@ -270,8 +285,21 @@ export default {
console.log(await this.inspectionOfProhibitionBill()) console.log(await this.inspectionOfProhibitionBill())
if (await this.inspectionOfProhibitionBill()) return if (await this.inspectionOfProhibitionBill()) return
this.$emit('jump', 'CreateOrder', { paramsData: this.orderCardDetail, type: 'createWithPay' }) this.$emit('jump', 'CreateOrder', { paramsData: this.orderCardDetail, type: 'createWithPay' })
} else { } else if (this.selectType == 2) {
this.$emit('jump', 'DefeatOrder', { paramsData: this.orderCardDetail, type: 'createWithPay' }) this.$emit('jump', 'DefeatOrder', { paramsData: this.orderCardDetail, type: 'createWithPay' })
} else if (this.selectType == 4) {
let _this = this
uni.$api.boutiqueApi
.revokeOrder({
orderCode: this.orderCardDetail.orderCode
})
.then(data => {
uni.showToast({
title: '操作成功',
icon: 'success'
})
this.$emit('refresh')
})
} }
}, },
cancelSelection() { cancelSelection() {
......
...@@ -64,11 +64,11 @@ ...@@ -64,11 +64,11 @@
</view> </view>
</view> </view>
</view> </view>
<view class="flex align-center py-8"> <view class="flex align-center py-8" v-if="orderInfo">
<view class="sprite-icon icon-coupon fs-14"></view> <view class="sprite-icon icon-coupon fs-14"></view>
<text class="fs-14 coupon-name">{{ orderInfo.couponName || '' }}{{ orderInfo.customerCoupon.customerCouponCode || '' }}({{ orderInfo.customerCoupon.employeeName || '' }})</text> <text class="fs-14 coupon-name">{{ orderInfo.couponName || '' }}{{ orderInfo.customerCoupon.customerCouponCode || '' }}({{ orderInfo.customerCoupon.employeeName || '' }})</text>
</view> </view>
<view class="flex justify-end align-center"> <view class="flex justify-end align-center" v-if="orderInfo">
<text class="good-total-lable">商品总金额:</text> <text class="good-total-lable">商品总金额:</text>
<text class="good-total-value"> <text class="good-total-value">
<text class="unit">¥</text> <text class="unit">¥</text>
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
<uni-calendar class="calendar" :showMonth="false" @change="calendarChange" /> <uni-calendar class="calendar" :showMonth="false" @change="calendarChange" />
</template> </template>
</PublishPopup> </PublishPopup>
<!-- <OrderPopup :orderType="orderInfo.selectPayType" v-if="showPopup" :show="showPopup" :qrCode="orderInfo.payOrder.outTradeNo || ''" :price="orderInfo.total_price" :orderCode="orderInfo.orderCode" /> --> <order-popup ref="openDate" popupType="13" @onConfirm="confirmDate" />
<PublishPopup ref="payPopup" popupClass="payPopup" type="center" :isShowFooter="false"> <PublishPopup ref="payPopup" popupClass="payPopup" type="center" :isShowFooter="false">
<template #header> <template #header>
<view class="popup-top"> <view class="popup-top">
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
</view> </view>
</template> </template>
<template #content> <template #content>
<view class="pos-popup"> <view class="pos-popup" v-if="orderInfo">
<view class="price">¥{{ orderInfo.total_price }}</view> <view class="price">¥{{ orderInfo.total_price }}</view>
<image class="qrcode" :src="orderInfo.selectPayType == 1 ? wxqrcode : posQrCode"></image> <image class="qrcode" :src="orderInfo.selectPayType == 1 ? wxqrcode : posQrCode"></image>
<view class="level-1-tips">{{ orderInfo.selectPayType == 1 ? '请让客户打开微信扫描上方付款码进行支付' : '请使用POS机扫描此码,再向客户收款' }}</view> <view class="level-1-tips">{{ orderInfo.selectPayType == 1 ? '请让客户打开微信扫描上方付款码进行支付' : '请使用POS机扫描此码,再向客户收款' }}</view>
...@@ -223,6 +223,21 @@ export default { ...@@ -223,6 +223,21 @@ export default {
PublishPopup, PublishPopup,
OrderPopup OrderPopup
}, },
watch: {
transmissionOfData: {
handler(newVal) {
if (newVal) {
console.log('接收到的交易数据:', newVal)
console.log(this.transmissionOfData, 'this.transmissionOfData')
this.getPositionList()
// "this.transmissionOfData.orderCode"
this.getDetail(this.transmissionOfData.orderCode)
this.successDate = dayjs().format('YYYY-MM-DD HH:mm:ss')
}
},
immediate: true
}
},
data() { data() {
return { return {
...order_mixins.data, ...order_mixins.data,
...@@ -237,10 +252,10 @@ export default { ...@@ -237,10 +252,10 @@ export default {
} }
}, },
mounted() { mounted() {
this.getPositionList() // this.getPositionList()
// 250819144103724 // // "this.transmissionOfData.orderCode"
this.getDetail(this.transmissionOfData.orderCode) // this.getDetail('250826172036851')
this.successDate = dayjs().format('YYYY-MM-DD HH:mm:ss') // this.successDate = dayjs().format('YYYY-MM-DD HH:mm:ss')
}, },
methods: { methods: {
replaceItemText(item) { replaceItemText(item) {
...@@ -248,7 +263,7 @@ export default { ...@@ -248,7 +263,7 @@ export default {
return item ? item.replace(reg, ' ') : '' return item ? item.replace(reg, ' ') : ''
}, },
async getDetail(orderCode) { async getDetail(orderCode) {
// console.log(orderCode) console.log(orderCode)
let _this = this let _this = this
uni.$api.boutiqueApi uni.$api.boutiqueApi
.getPackageGoodsDetail({ .getPackageGoodsDetail({
...@@ -257,9 +272,7 @@ export default { ...@@ -257,9 +272,7 @@ export default {
.then(data => { .then(data => {
if (data.payOrder && data.payOrder.payStatus == 2) { if (data.payOrder && data.payOrder.payStatus == 2) {
if (this.time) clearInterval(this.time) if (this.time) clearInterval(this.time)
// wx.$router.redirectTo('orderDetail', { this.$emit('jump', 'OrderDetail', data)
// orderCode
// })
return return
} }
let couponName = data.customerCoupon ? data.customerCoupon.couponName : '' let couponName = data.customerCoupon ? data.customerCoupon.couponName : ''
...@@ -310,6 +323,7 @@ export default { ...@@ -310,6 +323,7 @@ export default {
data.carType = `${data.customer.carBrand || ''}-${data.customer.carChildsBrandName || ''}-${data.customer.carSeriesName || ''}` data.carType = `${data.customer.carBrand || ''}-${data.customer.carChildsBrandName || ''}-${data.customer.carSeriesName || ''}`
} }
_this.orderInfo = data _this.orderInfo = data
console.log('data', _this.orderInfo)
_this.flag = true _this.flag = true
_this.warrantyCardList = warrantyCardList _this.warrantyCardList = warrantyCardList
// 校验是否显示二级流量方 // 校验是否显示二级流量方
...@@ -485,7 +499,7 @@ export default { ...@@ -485,7 +499,7 @@ export default {
this.createPayOrder() this.createPayOrder()
}, },
openDate() { openDate() {
this.$refs.test.open() this.$refs.openDate.open()
}, },
customizeDate() { customizeDate() {
console.log(this.$refs.calendarPopup, 'this.$refs.calendarPopup') console.log(this.$refs.calendarPopup, 'this.$refs.calendarPopup')
...@@ -521,6 +535,7 @@ export default { ...@@ -521,6 +535,7 @@ export default {
uni.$api.boutiqueApi.createPayOrder(obj).then(data => { uni.$api.boutiqueApi.createPayOrder(obj).then(data => {
if (data) { if (data) {
console.log(`类型为:${selectPayType}`) console.log(`类型为:${selectPayType}`)
console.log(this.orderInfo)
if (selectPayType == 3 || selectPayType == 1) { if (selectPayType == 3 || selectPayType == 1) {
this.orderInfo.payOrder.outTradeNo = data.outTradeNo this.orderInfo.payOrder.outTradeNo = data.outTradeNo
let size = 0 let size = 0
...@@ -654,6 +669,7 @@ export default { ...@@ -654,6 +669,7 @@ export default {
height: 100%; height: 100%;
.scroll-y { .scroll-y {
border-radius: toRpx(16);
height: calc(100% - #{toRpx(296)}); height: calc(100% - #{toRpx(296)});
overflow-y: scroll; overflow-y: scroll;
&::-webkit-scrollbar { &::-webkit-scrollbar {
......
...@@ -464,7 +464,7 @@ export default { ...@@ -464,7 +464,7 @@ export default {
baseGoodsId: e.multipleSpecificationsGoods.goods.baseGoodsId, baseGoodsId: e.multipleSpecificationsGoods.goods.baseGoodsId,
totalPrice: Number(e.multipleSpecificationsGoods.goods.sellPrice), totalPrice: Number(e.multipleSpecificationsGoods.goods.sellPrice),
number: e.multipleSpecificationsGoods.number, number: e.multipleSpecificationsGoods.number,
merchantGoodsId: e.multipleSpecificationsGoods.goods.id || e.multipleSpecificationsGoods.goods.merchantGoodsId, merchantGoodsId: e.multipleSpecificationsGoods.goods.id || e.multipleSpecificationsGoods.goods.merchantGoodsId
}) })
} }
}) })
...@@ -486,7 +486,7 @@ export default { ...@@ -486,7 +486,7 @@ export default {
title: '保存成功', title: '保存成功',
icon: 'success' icon: 'success'
}) })
this.$emit('jump', 'ConfirmOrder', res.data) this.$emit('jump', orderCreateType == 'supplementOrder' ? 'OrderDetail' : 'ConfirmOrder', res)
} }
}, },
// 计算所有产品的总价 // 计算所有产品的总价
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
:value="orderObj[i.value]" :value="orderObj[i.value]"
:range="i.range" :range="i.range"
:range-key="i.rangeKey" :range-key="i.rangeKey"
@change="orderObj[i.value] = $event.detail.value" @change="changePicker($event,i)"
:disabled="filterDisabled(isEditReport)" :disabled="filterDisabled(isEditReport)"
> >
{{i.range[orderObj[i.value]][i.rangeKey] || ''}} {{i.range[orderObj[i.value]][i.rangeKey] || ''}}
...@@ -211,7 +211,8 @@ export default { ...@@ -211,7 +211,8 @@ export default {
range: [ range: [
{ id: 'N', name: '否' }, { id: 'N', name: '否' },
{ id: 'Y', name: '是' } { id: 'Y', name: '是' }
] ],
submitValue: 'onBreak'
}, },
{ {
label: '个人成交总金额', label: '个人成交总金额',
...@@ -496,14 +497,36 @@ export default { ...@@ -496,14 +497,36 @@ export default {
handleBlur (e, i) { handleBlur (e, i) {
let { value } = e.detail let { value } = e.detail
if (value) { if (value) {
let { orderObj, userInfo } = this
let key = i.value, let key = i.value,
numbers = value.match(/\d+/g) numbers = value.match(/\d+/g)
numbers = numbers ? numbers.join('') : '' numbers = numbers ? numbers.join('') : ''
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '') if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
this.orderObj[key] = Math.min(Math.max(Number(numbers), 0), 100).toString() this.orderObj[key] = Math.min(Math.max(Number(numbers), 0), 100).toString()
this.dateKey = Date.now() this.dateKey = Date.now()
if (
this.isNotEmpty(orderObj.recordStaffCount) &&
this.isNotEmpty(value) &&
orderObj.recordStaffCount != value &&
orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid
) uni.showModal({
title: '预警提示',
content: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`,
showCancel: false,
confirmText: '知道了',
confirmColor: '#347BFF'
})
} }
}, },
isNotEmpty (value) {
return (
value !== null &&
value !== undefined &&
value !== '' &&
!(Array.isArray(value) && value.length === 0)
)
},
handleCarInputBlur (e, i, item) { handleCarInputBlur (e, i, item) {
let { value } = e.detail let { value } = e.detail
if (value) { if (value) {
...@@ -516,37 +539,44 @@ export default { ...@@ -516,37 +539,44 @@ export default {
} }
}, },
async submit () { async submit () {
uni.showLoading({
title: '提交中',
mask: true
})
try { try {
let { orderObj, carBandList } = this let { orderObj, carBandList, hwOhterObjArray } = this
orderObj.isAdmin = false orderObj.isAdmin = false
orderObj.oprBy = orderObj.staffUuid orderObj.oprBy = orderObj.staffUuid
orderObj.sceneType = 1 orderObj.sceneType = 1
orderObj.brandDataList = carBandList orderObj.brandDataList = carBandList
if (orderObj.onBreak == 'Y') {
orderObj.brandDataList.forEach(item => {
item.notDeliveryCount = item.notDeliveryCount || 0
item.equityToShopCount = item.equityToShopCount || 0
})
}
if (orderObj.pickerValue == 0) { if (orderObj.pickerValue == 0) {
if (orderObj.staffCount == null) throw { if (orderObj.staffCount == null) throw {
message: '今日驻店人数(按店)', message: '今日驻店人数(按店)',
refId: 'staffCount' refId: 'staffCount'
} }
orderObj.brandDataList.map((e, index) => { carBandList.map((item, index) => {
if (e.deliveryCount == null) throw { message: '店端实际交车数', refId: `deliveryCount_${index}` } hwOhterObjArray.map(el => {
if (!e.notDeliveryCount == null) throw { message: '店端总未触客数', refId: `notDeliveryCount_${index}` } if (el.required && ['', null].includes(item[el.key])) throw {
if (!e.equityToShopCount == null) throw { message: '实际售前触客数', refId: `equityToShopCount_${index}` } message: el.label,
refId: `${el.refId}_${index}`
}
})
})
}
if (orderObj.onBreak == 'Y') {
orderObj.brandDataList.forEach(item => {
item.notDeliveryCount = item.notDeliveryCount || 0
item.equityToShopCount = item.equityToShopCount || 0
}) })
} }
const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj) const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
uni.hideLoading()
if (data) { if (data) {
this.isEditReport = false this.isEditReport = false
this.$refs.reportNotice.open() this.$refs.reportNotice.open()
} }
} catch (errorObj) { } catch (errorObj) {
console.log(errorObj) uni.hideLoading()
if (errorObj.message) { if (errorObj.message) {
uni.showToast({ uni.showToast({
title: `${errorObj.message}不能为空`, title: `${errorObj.message}不能为空`,
...@@ -563,6 +593,11 @@ export default { ...@@ -563,6 +593,11 @@ export default {
filterDisabled (disabledStatus) { filterDisabled (disabledStatus) {
let { weeklyList, currentDate, orderObj: { isDateWithin7Days } } = this let { weeklyList, currentDate, orderObj: { isDateWithin7Days } } = this
return weeklyList.includes(currentDate) && !disabledStatus || !isDateWithin7Days return weeklyList.includes(currentDate) && !disabledStatus || !isDateWithin7Days
},
changePicker (e, i) {
let { value } = e.detail
this.orderObj[i.value] = value
this.orderObj[i.submitValue] = value == 1 ? 'Y' : 'N'
} }
} }
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</view> </view>
<z-paging ref="paging" :fixed="false" paging-class="paging-class px-48" :loading-full-fixed="false" :auto-show-system-loading="true" :show-scrollbar="false" v-model="dataList" @query="queryList" :default-page-size="10"> <z-paging ref="paging" :fixed="false" paging-class="paging-class px-48" :loading-full-fixed="false" :auto-show-system-loading="true" :show-scrollbar="false" v-model="dataList" @query="queryList" :default-page-size="10">
<OrderCard v-for="(item, index) in dataList" :key="index" :orderCardDetail="item" @toggle-goods-list="handleToggleGoodsList" @jump="jump"></OrderCard> <OrderCard v-for="(item, index) in dataList" :key="index" :orderCardDetail="item" @toggle-goods-list="handleToggleGoodsList" @jump="jump" @refresh="search()"></OrderCard>
</z-paging> </z-paging>
<PublishPopup ref="WaitinputorderPopup" popupClass="waitinputorderPopup" :showClose="true" title="选择交易参考号"> <PublishPopup ref="WaitinputorderPopup" popupClass="waitinputorderPopup" :showClose="true" title="选择交易参考号">
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</template> </template>
</PublishPopup> </PublishPopup>
<PublishPopup ref="abnormalTipsPopup" popupClass="abnormalTipsPopup" :showClose="true" title="超分账期"> <PublishPopup ref="abnormalTipsPopup" popupClass="abnormalTipsPopup" :showClose="true" title="超分账期" @confirm="confirmTips">
<template #content> <template #content>
<scroll-view scroll-y class="ul px-48"> <scroll-view scroll-y class="ul px-48">
<view class="title">字段定义</view> <view class="title">字段定义</view>
...@@ -147,6 +147,17 @@ export default { ...@@ -147,6 +147,17 @@ export default {
PublishPopup, PublishPopup,
OrderScreen OrderScreen
}, },
computed: {
orderObj() {
return order_mixins.data.orderObj || []
},
payType() {
return order_mixins.data.payType || {}
},
status() {
return order_mixins.data.status || {}
}
},
data() { data() {
return { return {
itemFormObj: [ itemFormObj: [
...@@ -199,13 +210,12 @@ export default { ...@@ -199,13 +210,12 @@ export default {
normalCurrentPage: 1, normalCurrentPage: 1,
abnormalPages: 1, abnormalPages: 1,
normalPages: 1, normalPages: 1,
userInfo: null,
checkListObj: {}, checkListObj: {},
...order_mixins.data localUserInfo: null
} }
}, },
mounted() { mounted() {
this.userInfo = uni.$storage.get('userInfo') || {} this.localUserInfo = uni.$storage.get('userInfo') || {}
this.search() this.search()
this.startWaitOrderPolling() this.startWaitOrderPolling()
}, },
...@@ -214,10 +224,10 @@ export default { ...@@ -214,10 +224,10 @@ export default {
}, },
methods: { methods: {
search() { search() {
// 判断是不是超管 && !this.userInfo.isSuper // 判断是不是超管 && !this.localUserInfo.isSuper
// ,不是只能筛选当前4s店的 // ,不是只能筛选当前4s店的
if (!this.searchObj.merchantId) { if (!this.searchObj.merchantId) {
this.searchObj.merchantId = this.userInfo?.shopMerchantId this.searchObj.merchantId = this.localUserInfo?.shopMerchantId
} }
this.$refs.paging.reload() this.$refs.paging.reload()
this.getStatByStatus() this.getStatByStatus()
...@@ -326,7 +336,7 @@ export default { ...@@ -326,7 +336,7 @@ export default {
.then(result => { .then(result => {
const { list, total } = result const { list, total } = result
// 这个是用来判断哪些用户可以撤销的 // 这个是用来判断哪些用户可以撤销的
let userType = (!this.userInfo.isSuper && this.userInfo.merchantType) || (this.userInfo.loginRole !== 3 && this.userInfo?.loginRole !== 6) let userType = (!this.localUserInfo.isSuper && this.localUserInfo.merchantType) || (this.localUserInfo.loginRole !== 3 && this.localUserInfo?.loginRole !== 6)
// let userType = true // let userType = true
list.map(e => { list.map(e => {
...@@ -339,8 +349,8 @@ export default { ...@@ -339,8 +349,8 @@ export default {
// 开票按钮 // 开票按钮
e.invoiceName = e.invoiceStatus == 2 ? '查看发票' : '申请开票' e.invoiceName = e.invoiceStatus == 2 ? '查看发票' : '申请开票'
// && e.status != 1 待跟进现在也能撤销 // && e.status != 1 待跟进现在也能撤销
let orderType = (this.userInfo.userType == 1 || this.userInfo.userType == 2) && e.status != 9 && ![1, 3, 4].includes(e.selectPayType) let orderType = (this.localUserInfo.userType == 1 || this.localUserInfo.userType == 2) && e.status != 9 && ![1, 3, 4].includes(e.selectPayType)
// let orderType = this.userInfo.userType !== 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1 // let orderType = this.localUserInfo.userType !== 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1
// console.log(userType); // console.log(userType);
// console.log(orderType); // console.log(orderType);
e.repeal = userType && orderType e.repeal = userType && orderType
...@@ -437,6 +447,9 @@ export default { ...@@ -437,6 +447,9 @@ export default {
showQuestionPopup() { showQuestionPopup() {
this.$refs.abnormalTipsPopup.open() this.$refs.abnormalTipsPopup.open()
}, },
confirmTips() {
this.$refs.abnormalTipsPopup.closePopup()
},
activeClick(item) { activeClick(item) {
if (this.checkListObj[item.tradeNo]) { if (this.checkListObj[item.tradeNo]) {
this.$delete(this.checkListObj, item.tradeNo) this.$delete(this.checkListObj, item.tradeNo)
......
<template> <template>
<view class="detail-box"> <view class="detail-box">
<view class="nav-bar"> <view class="nav-bar">
<view <view class="back" @click="backPage">
class="back" <uni-icons type="left" :size="20" color="#000"></uni-icons>
@click="backPage"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view> </view>
<view class="title">展业工具</view> <view class="title">展业工具</view>
</view> </view>
...@@ -17,45 +10,20 @@ ...@@ -17,45 +10,20 @@
<view class="detail-left"> <view class="detail-left">
<view class="common-title">展业</view> <view class="common-title">展业</view>
<view class="content"> <view class="content">
<image <image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" />
class="banner"
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<template v-if="toolComponentName !== 'DailyReport'"> <template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance> <Entrance @entranceClick="entranceClick"></Entrance>
</template> </template>
<template v-else> <template v-else>
<uni-calendar <uni-calendar ref="calendar" :clearDate="false" :endDate="endDate" :showMonth="false" @monthSwitch="currentMonth = `${$event.year}-${$event.month}`" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" />
ref="calendar"
:clearDate="false"
:endDate="endDate"
:showMonth="false"
@monthSwitch="currentMonth = `${$event.year}-${$event.month}`"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
/>
</template> </template>
</view> </view>
</view> </view>
<view class="detail-right"> <view class="detail-right">
<component <component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" @setCalendarSelected="selectedDays = $event" />
:is="toolComponentName"
@jump="jump"
:transmission-of-data="transmissionOfData"
:currentDate="currentDate"
:currentMonth="currentMonth"
@setCalendarSelected="selectedDays = $event"
/>
</view> </view>
</view> </view>
<NoticePopup <NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
ref="notice"
title="重要提示"
text="当前页面暂未保存,是否确认退出"
type="warning"
></NoticePopup>
</view> </view>
</template> </template>
...@@ -85,7 +53,7 @@ export default { ...@@ -85,7 +53,7 @@ export default {
UploadProofOfPayment, UploadProofOfPayment,
OrderDetail OrderDetail
}, },
data () { data() {
return { return {
toolComponentName: '', toolComponentName: '',
transmissionOfData: null, transmissionOfData: null,
...@@ -95,16 +63,16 @@ export default { ...@@ -95,16 +63,16 @@ export default {
selectedDays: [] selectedDays: []
} }
}, },
onLoad (options) { onLoad(options) {
if (options.componentName) this.toolComponentName = options.componentName if (options.componentName) this.toolComponentName = options.componentName
uni.$on('jumpToDailyReport', _ => { uni.$on('jumpToDailyReport', _ => {
this.toolComponentName = 'DailyReport' this.toolComponentName = 'DailyReport'
}) })
}, },
methods: { methods: {
async entranceClick (item) { async entranceClick(item) {
console.log(item) console.log(item)
if (item.name != 'DailyReport' && (await this.checkDailyReport() || await this.inspectionOfProhibitionBill())) return if (item.name != 'DailyReport' && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
// 保存当前选择的组件信息,但不立即切换 // 保存当前选择的组件信息,但不立即切换
const selectedItem = item const selectedItem = item
if (this.toolComponentName == selectedItem.name) return if (this.toolComponentName == selectedItem.name) return
...@@ -129,24 +97,26 @@ export default { ...@@ -129,24 +97,26 @@ export default {
} }
this.$refs.notice.close() this.$refs.notice.close()
} }
}, { },
{
text: '继续编辑', text: '继续编辑',
type: 'primary', type: 'primary',
callback: () => { callback: () => {
this.$refs.notice.close() this.$refs.notice.close()
} }
}] }
]
// 打开弹窗 // 打开弹窗
this.$refs.notice.open() this.$refs.notice.open()
}, },
backPage () { backPage() {
uni.navigateBack() uni.navigateBack()
}, },
// name:跳转组件名,val:跳转参数 // name:跳转组件名,val:跳转参数
jump (name, val) { jump(name, val) {
this.toolComponentName = name this.toolComponentName = name
console.log(this.toolComponentName) console.log(this.toolComponentName, val)
if (val) { if (val) {
this.transmissionOfData = val this.transmissionOfData = val
} }
......
...@@ -190,20 +190,24 @@ $uni-primary: #4673ff !default; ...@@ -190,20 +190,24 @@ $uni-primary: #4673ff !default;
.uni-calendar-item--checked { .uni-calendar-item--checked {
background-color: $uni-primary; background-color: $uni-primary;
color: #fff; color: #fff;
opacity: 0.8; // opacity: 0.8;
} }
.uni-calendar-item--multiple { .uni-calendar-item--multiple {
background-color: $uni-primary; background-color: rgba($color: $uni-primary, $alpha: 0.8);
color: #fff; color: #fff;
opacity: 0.8; .uni-calendar-item--multiple{
background: none;
}
// opacity: 0.8;
} }
.uni-calendar-item--before-checked { .uni-calendar-item--before-checked {
background-color: #ff5a5f; background-color: #4673FF;
color: #fff; color: #fff;
} }
.uni-calendar-item--after-checked { .uni-calendar-item--after-checked {
background-color: #ff5a5f; background-color: #4673FF;
color: #fff; color: #fff;
border-radius: inherit;
} }
</style> </style>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
> >
<text class="uni-calendar__header-text uni-calendar--fixed-width">{{cancelText}}</text> <text class="uni-calendar__header-text uni-calendar--fixed-width">{{cancelText}}</text>
</view> </view>
<viw class="uni-calendar__header-title">{{title}}</viw>
<view <view
class="uni-calendar__header-btn-box" class="uni-calendar__header-btn-box"
@click="confirm" @click="confirm"
...@@ -184,9 +185,13 @@ export default { ...@@ -184,9 +185,13 @@ export default {
type: Object, type: Object,
default: () => { { } } default: () => { { } }
}, },
backgroundColor:{ backgroundColor: {
type: String, type: String,
default: '#fff' default: '#fff'
},
title:{
type: String,
default: '选择日期'
} }
}, },
data () { data () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!