Commit dcf220a3 by zhangxw

4月 月中版本开发

1 parent 6b70adbb
...@@ -27,4 +27,10 @@ export function quotationPrint(data) { ...@@ -27,4 +27,10 @@ export function quotationPrint(data) {
export function quotationExport(data) { export function quotationExport(data) {
data.method = `${path}quotation.export` data.method = `${path}quotation.export`
return request(data) return request(data)
}
\ No newline at end of file \ No newline at end of file
}
// 打印 返回权益合同PDF文件Url
export function contractExport(data) {
data.method = ``
return request(data)
}
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
width="150" width="150"
trigger="click" trigger="click"
v-model="isPopoverVisible"> v-model="isPopoverVisible">
<block> <template>
<p class="flex"> <p class="flex">
<el-checkbox :indeterminate="isIndeterminate" <el-checkbox :indeterminate="isIndeterminate"
v-model="checkAll" v-model="checkAll"
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
{{ item[optionConfig.optionLabel] }} {{ item[optionConfig.optionLabel] }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</block> </template>
<img slot="reference" <img slot="reference"
class="head-search" class="head-search"
src="./image/search.png" src="./image/search.png"
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
props: { props: {
// 原来的model值 // 原来的model值
searchForm: { searchForm: {
type: Array, type: Object,
default: () => { } default: () => { }
}, },
optionConfig: { optionConfig: {
......
...@@ -208,6 +208,12 @@ export const routerName = { ...@@ -208,6 +208,12 @@ export const routerName = {
// parentId: "91101", // parentId: "91101",
label: "打印", label: "打印",
handle: "handlePrint" handle: "handlePrint"
},
{
authId: "9040604",
parentId: "90406",
label: "打印合同",
handle: "handlePrintContract"
} }
], ],
component: _import("vehicleDamage/vehicleDamageList") component: _import("vehicleDamage/vehicleDamageList")
......
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
<img <img
class="detail-header" class="detail-header"
:src="item.info.sex === 1 ? './images/header-man-grey.png' : './images/header-woman.png'"> :src="item.info.sex === 1 ? './images/header-man-grey.png' : './images/header-woman.png'">
<block class="detail-info"> <template class="detail-info">
<p>{{ item.info.name }}</p> <p>{{ item.info.name }}</p>
<p>{{ item.info.project }}</p> <p>{{ item.info.project }}</p>
</block> </template>
<block class="detail-phone"> <template class="detail-phone">
<p <p
class="secret-phone" class="secret-phone"
v-show="!item.info.phone"> v-show="!item.info.phone">
...@@ -35,10 +35,10 @@ ...@@ -35,10 +35,10 @@
class="two-tip" class="two-tip"
@click="handleGetPhone(item, index)">获取虚拟手机号</span> @click="handleGetPhone(item, index)">获取虚拟手机号</span>
</p> </p>
<p v-show="item.info.phone"> <p v-show="item.info.phone">
{{ item.info.phone }} {{ item.info.phone }}
</p> </p>
</block> </template>
</td> </td>
<td> <td>
{{ item.status === 1 ? '完成服务' : '未到店' }} {{ item.status === 1 ? '完成服务' : '未到店' }}
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
</tr> </tr>
</template> </template>
<tr v-else> <tr v-else>
<td colspan="3"> <td colspan="3">
无数据 无数据
</td> </td>
</tr> </tr>
</table> </table>
...@@ -239,7 +239,7 @@ export default { ...@@ -239,7 +239,7 @@ export default {
transition: left 1s; transition: left 1s;
cursor: pointer; cursor: pointer;
span { span {
display: inline-block; display: inline-template;
width: 180px; width: 180px;
height: 100%; height: 100%;
} }
......
...@@ -6,20 +6,20 @@ ...@@ -6,20 +6,20 @@
<p>2020年</p> <p>2020年</p>
</div> </div>
<div class="time-selector-container"> <div class="time-selector-container">
<block class="date-left-tips"> <template class="date-left-tips">
<div class="date-tips-time"> <div class="date-tips-time">
<p>上午9:00</p> <p>上午9:00</p>
<p>中午12:00</p> <p>中午12:00</p>
<p>晚上18:00</p> <p>晚上18:00</p>
</div> </div>
<p class="date-y-line" /> <p class="date-y-line" />
</block> </template>
<el-button icon="el-icon-d-arrow-left" <el-button icon="el-icon-d-arrow-left"
type="text" type="text"
class="arrow-left-icon" class="arrow-left-icon"
:disabled="currentWeek === 1" :disabled="currentWeek === 1"
@click="handleWeek(false)" /> @click="handleWeek(false)" />
<block> <template>
<div class="date-picker"> <div class="date-picker">
<div class="wrapper" <div class="wrapper"
v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)" v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)"
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<p>2、客户姓名,时间,项目</p> <p>2、客户姓名,时间,项目</p>
<p>余位数:8</p> <p>余位数:8</p>
</div> </div>
<el-button :class="{'col-width': true, 'hour-block': true, 'status-full': info.status === 2, 'status-remain': info.status === 1 }" <el-button :class="{'col-width': true, 'hour-template': true, 'status-full': info.status === 2, 'status-remain': info.status === 1 }"
slot="reference" slot="reference"
@click="handleAppoint(item, infoIndex)"> @click="handleAppoint(item, infoIndex)">
{{ appointStatusList[info.status] }}</el-button> {{ appointStatusList[info.status] }}</el-button>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</el-button> </el-button>
</div> </div>
</div> </div>
</block> </template>
<el-button icon="el-icon-d-arrow-right" <el-button icon="el-icon-d-arrow-right"
type="text" type="text"
:disabled="currentWeek === 5" :disabled="currentWeek === 5"
......
...@@ -592,17 +592,26 @@ export default { ...@@ -592,17 +592,26 @@ export default {
} else { } else {
return return
} }
this.$confirm(html + '所有升级商品需要进入审核', '提示', { if (this.isThirdShop(row?.goodsInfo?.supplierCode)) {
confirmButtonText: '确定', let data = { baseGoodsId: row.id, shelfStatus: shelfStatus, needReview: false }
cancelButtonText: '取消', this.baseGoodsUpOrDown(data)
type: 'warning' } else {
}).then(() => { this.$confirm(html + '所有升级商品需要进入审核', '提示', {
baseGoodsUpOrDown({ baseGoodsId: row.id, shelfStatus: shelfStatus }).then(res => { confirmButtonText: '确定',
this.notice.okTips() cancelButtonText: '取消',
this.$refs.commodityTable.refreshTable() type: 'warning'
}).then(() => {
let data = { baseGoodsId: row.id, shelfStatus: shelfStatus, needReview: true }
this.baseGoodsUpOrDown(data)
}).catch(err => {
console.log(err)
}) })
}).catch(err => { }
console.log(err) },
baseGoodsUpOrDown(data) {
baseGoodsUpOrDown({ ...data }).then(res => {
this.notice.okTips()
this.$refs.commodityTable.refreshTable()
}) })
}, },
// 父商品上下架操作按钮显示 // 父商品上下架操作按钮显示
...@@ -631,6 +640,12 @@ export default { ...@@ -631,6 +640,12 @@ export default {
} }
return flag return flag
}, },
filterEmpty(data) {
return data instanceof Array ? data.length <= 0 : (data ?? '') === ''
},
isThirdShop(data) {
return !this.filterEmpty(data) && data !== '12'
},
// 子商品单独上下架 // 子商品单独上下架
handleUpOrDownForChild(row) { handleUpOrDownForChild(row) {
console.log(row) console.log(row)
...@@ -653,22 +668,32 @@ export default { ...@@ -653,22 +668,32 @@ export default {
html = '下架' html = '下架'
shelfStatus = '0' shelfStatus = '0'
} }
this.$confirm(html + '该商品需要进入审核', '提示', { // 第三方商品上下架不走审核流程
confirmButtonText: '确定', if (this.isThirdShop(row?.goodsInfo?.supplierCode)) {
cancelButtonText: '取消', let data = { upgradedGoodsId: row.id, shelfStatus: shelfStatus, needReview: false }
type: 'warning' this.baseGoodsUpOrDownForChild(data)
}).then(() => { } else {
baseGoodsUpOrDownForChild({ upgradedGoodsId: row.id, shelfStatus: shelfStatus }).then(res => { this.$confirm(html + '该商品需要进入审核', '提示', {
this.notice.okTips() confirmButtonText: '确定',
this.$refs.commodityTable.refreshTable() cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = { upgradedGoodsId: row.id, shelfStatus: shelfStatus, needReview: true }
this.baseGoodsUpOrDownForChild(data)
}).catch(err => {
console.log(err)
}) })
}).catch(err => { }
console.log(err)
})
} }
} }
} }
}, },
baseGoodsUpOrDownForChild(data) {
baseGoodsUpOrDownForChild({ ...data }).then(res => {
this.notice.okTips()
this.$refs.commodityTable.refreshTable()
})
},
handleDetail(row) { handleDetail(row) {
this.detailData = deepClone(row) this.detailData = deepClone(row)
this.detailVisible = true this.detailVisible = true
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
<script> <script>
import { getDetailList, getDistinctColum } from '@api/coupons' import { getDetailList, getDistinctColum } from '@api/coupons'
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { BaseData } from '@/common/constants.js'
import { mapActions } from 'vuex'
export default { export default {
name: 'CouponsDetail', name: 'CouponsDetail',
data() { data() {
...@@ -27,7 +29,8 @@ export default { ...@@ -27,7 +29,8 @@ export default {
searchForm: { searchForm: {
usedFlagList: [], usedFlagList: [],
employeeNameList: [], employeeNameList: [],
sellerNameList: [] sellerNameList: [],
couponTypeList: []
}, },
searchFormSearch: {}, searchFormSearch: {},
getListApi: getDetailList, getListApi: getDetailList,
...@@ -63,6 +66,16 @@ export default { ...@@ -63,6 +66,16 @@ export default {
prop: 'couponName', prop: 'couponName',
addHtml: 'couponName' addHtml: 'couponName'
}, { }, {
label: '类型',
parentProp: 'couponInfo',
prop: 'couponTypeName',
optionConfig: {
searchItemName: 'couponTypeList',
optionId: 'goodsType',
optionLabel: 'goodsTypeName'
}
// optionList: []
}, {
label: '门店名称', label: '门店名称',
prop: 'merchantName', prop: 'merchantName',
formatter: cellValue => { formatter: cellValue => {
...@@ -116,6 +129,7 @@ export default { ...@@ -116,6 +129,7 @@ export default {
baseData: { baseData: {
employeeNameList: [], employeeNameList: [],
sellerNameList: [], sellerNameList: [],
couponTypeList: [],
usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }] usedFlagList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }]
} }
} }
...@@ -131,9 +145,17 @@ export default { ...@@ -131,9 +145,17 @@ export default {
mounted() { mounted() {
this.getDistinctColumList(1, 'employeeNameList') this.getDistinctColumList(1, 'employeeNameList')
this.getDistinctColumList(2, 'sellerNameList') this.getDistinctColumList(2, 'sellerNameList')
this.getBaseData()
}, },
methods: { methods: {
...mapActions({
get: 'd2admin/base/get'
}),
async getBaseData() {
this.baseData.couponTypeList = deepClone(await this.get(BaseData.productType))
this.$nextTick()
},
// columType属性类型(1:发券人;2:转化人) // columType属性类型(1:发券人;2:转化人)
getDistinctColumList(columType, listName) { getDistinctColumList(columType, listName) {
getDistinctColum({ columType: columType, currentPage: 1, pageSize: 100 }).then(res => { getDistinctColum({ columType: columType, currentPage: 1, pageSize: 100 }).then(res => {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</el-form-item> </el-form-item>
<el-form-item label="类型" <el-form-item label="类型"
prop="couponType"> prop="couponType">
<el-select :disabled="couponInfo" <el-select :disabled="couponInfo && Object.keys(couponInfo).length > 0"
v-model="couponsForm.couponType"> v-model="couponsForm.couponType">
<el-option v-for="(item, index) in baseData.productTypeList" <el-option v-for="(item, index) in baseData.productTypeList"
:key="index" :key="index"
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否收费"> <el-form-item label="是否收费">
<el-radio-group :disabled="couponInfo" <el-radio-group :disabled="couponInfo && Object.keys(couponInfo).length > 0"
v-model="couponsForm.chargeFlag"> v-model="couponsForm.chargeFlag">
<el-radio label="N"> <el-radio label="N">
免费 免费
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
placeholder="请输入内容" placeholder="请输入内容"
v-model="couponsForm.remark" /> v-model="couponsForm.remark" />
</el-form-item> </el-form-item>
<template v-if="couponInfo"> <template v-if="couponInfo && Object.keys(couponInfo).length > 0">
<el-form-item label="门店名称:"> <el-form-item label="门店名称:">
<span>{{ couponInfo.merchantName }}</span> <span>{{ couponInfo.merchantName }}</span>
</el-form-item> </el-form-item>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
]"> ]">
<el-input-number v-model="couponsForm.amount" <el-input-number v-model="couponsForm.amount"
:min="1" :min="1"
:max="999" :max="99999"
size="mini" /> size="mini" />
</el-form-item> </el-form-item>
</template> </template>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
slot-scope="scope"> slot-scope="scope">
<el-input-number v-model="couponsNumList[scope.scope.index]" <el-input-number v-model="couponsNumList[scope.scope.index]"
:min="1" :min="1"
:max="999" :max="99999"
size="mini" size="mini"
@change="handleNumChange(scope.scope.index)" /> @change="handleNumChange(scope.scope.index)" />
<span class="car-error-txt" <span class="car-error-txt"
...@@ -150,6 +150,7 @@ export default { ...@@ -150,6 +150,7 @@ export default {
remark: [{ required: true, message: '请输入礼券说明', trigger: 'change' }] remark: [{ required: true, message: '请输入礼券说明', trigger: 'change' }]
// merchantCouponDTOList: [{ required: true, message: '请选择门店', trigger: 'change' }] // merchantCouponDTOList: [{ required: true, message: '请选择门店', trigger: 'change' }]
}, },
rules: {},
// 关联门店 // 关联门店
relateStoreVisible: false, relateStoreVisible: false,
sourcePage: 'coupons', sourcePage: 'coupons',
...@@ -251,10 +252,10 @@ export default { ...@@ -251,10 +252,10 @@ export default {
return true return true
} }
this.couponsForm.merchantCouponDTOList = selectedData this.couponsForm.merchantCouponDTOList = selectedData
this.couponsNumList = new Array(selectedData.length).fill(999) this.couponsNumList = new Array(selectedData.length).fill(99999)
this.couponsForm.merchantCouponDTOList.forEach((item, idx) => { this.couponsForm.merchantCouponDTOList.forEach((item, idx) => {
if (!item.hasOwnProperty('amount')) { if (!item.hasOwnProperty('amount')) {
item.amount = 999 item.amount = 99999
} else { } else {
this.couponsNumList[idx] = item.amount this.couponsNumList[idx] = item.amount
} }
......
...@@ -59,7 +59,8 @@ export default { ...@@ -59,7 +59,8 @@ export default {
activeName: 'storeList', activeName: 'storeList',
parentSearchForm: { parentSearchForm: {
couponName: '', couponName: '',
merchantName: '' merchantName: '',
issuer: ''
}, },
showFormData: [{ showFormData: [{
label: '礼券名称', label: '礼券名称',
...@@ -73,6 +74,12 @@ export default { ...@@ -73,6 +74,12 @@ export default {
type: 'input', type: 'input',
isClear: true, isClear: true,
keyFn: this.handleSearch keyFn: this.handleSearch
}, {
label: '发券人',
name: 'issuer',
type: 'input',
isClear: true,
keyFn: this.handleSearch
}], }],
// 新增 // 新增
couponsVisible: false couponsVisible: false
......
...@@ -84,17 +84,19 @@ export default { ...@@ -84,17 +84,19 @@ export default {
optionLabel: 'goodsTypeName' optionLabel: 'goodsTypeName'
} }
// optionList: [] // optionList: []
}, { },
label: '区域', // {
parentProp: 'yqMerchantInfo', // label: '区域',
prop: 'region', // parentProp: 'yqMerchantInfo',
optionConfig: { // prop: 'region',
searchItemName: 'regionList', // optionConfig: {
optionId: 'confKey', // searchItemName: 'regionList',
optionLabel: 'confValue' // optionId: 'confKey',
} // optionLabel: 'confValue'
// optionList: [] // }
}, { // // optionList: []
// },
{
label: '门店名称', label: '门店名称',
prop: 'merchantName', prop: 'merchantName',
formatter: cellValue => { formatter: cellValue => {
...@@ -142,7 +144,8 @@ export default { ...@@ -142,7 +144,8 @@ export default {
couponTypeList: [], couponTypeList: [],
regionList: [], regionList: [],
enabledFlagList: [{ confLabel: '启用', confId: 'Y' }, { confLabel: '停用', confId: 'N' }] enabledFlagList: [{ confLabel: '启用', confId: 'Y' }, { confLabel: '停用', confId: 'N' }]
} },
couponInfo: {}
} }
}, },
......
...@@ -53,23 +53,24 @@ ...@@ -53,23 +53,24 @@
<span>可选择的服务项目(多选)</span> <span>可选择的服务项目(多选)</span>
</td> </td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<span class="color-red">*</span> <span class="color-red" v-show="!isThirdShop()">*</span>
<el-input <el-input
style="width: 80px;" style="width: 80px;"
size="small" size="small"
:class="{ 'w-100-per': true, 'border-red': (filterEmpty(batchObj.shopPrice) || formatPrice()) && batchSubmitted.shopPriceEmpty }" :disabled="isThirdShop()"
:class="{ 'w-100-per': true, 'border-red': (filterEmpty(batchObj.shopPrice) || formatPrice()) && batchSubmitted.shopPriceEmpty && !isThirdShop() }"
placeholder="成本" placeholder="成本"
v-model="batchObj.shopPrice" v-model="batchObj.shopPrice"
@input="handleBatchShopPrice" @input="handleBatchShopPrice"
@blur="handleBatchShopPriceBlur"> @blur="handleBatchShopPriceBlur">
<el-popover <el-popover
v-show="(filterEmpty(batchObj.shopPrice) || formatPrice()) && batchSubmitted.shopPriceEmpty" v-show="(filterEmpty(batchObj.shopPrice) || formatPrice()) && batchSubmitted.shopPriceEmpty && !isThirdShop()"
slot="suffix" slot="suffix"
placement="top" placement="top"
title title
width="90" width="90"
trigger="hover" trigger="hover"
:content="formatPrice() ? '成本价需≤零售价,成本价需≤最低价' : '成本是必填项'"> :content="formatPriceText('', 0)">
<i class="el-icon-warning color-red" slot="reference" /> <i class="el-icon-warning color-red" slot="reference" />
</el-popover> </el-popover>
</el-input> </el-input>
...@@ -113,7 +114,7 @@ ...@@ -113,7 +114,7 @@
title title
width="90" width="90"
trigger="hover" trigger="hover"
:content="formatPrice() ? '零售价需≥成本,零售价需≥最低价' : '零售是必填项'"> :content="formatPriceText('', 1)">
<i class="el-icon-warning color-red" slot="reference" /> <i class="el-icon-warning color-red" slot="reference" />
</el-popover> </el-popover>
</el-input> </el-input>
...@@ -135,7 +136,7 @@ ...@@ -135,7 +136,7 @@
title title
width="90" width="90"
trigger="hover" trigger="hover"
:content="formatPrice() ? '最低价需≥产品成本,最低价需≤零售价' : '最低价是必填项'"> :content="formatPriceText('', 2)">
<i class="el-icon-warning color-red" slot="reference" /> <i class="el-icon-warning color-red" slot="reference" />
</el-popover> </el-popover>
</el-input> </el-input>
...@@ -272,17 +273,18 @@ ...@@ -272,17 +273,18 @@
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input placeholder="成本" <el-input placeholder="成本"
size="small" size="small"
:class="{ 'w-80-per': true, 'w-100-per': true, 'border-red': (filterEmpty(subItem.shopPrice) || formatPrice(subIndex)) && subItem.shopPriceEmpty }" :class="{ 'w-80-per': true, 'w-80-per-noTansform': isThirdShop(), 'w-100-per': true, 'border-red': (filterEmpty(subItem.shopPrice) || formatPrice(subIndex)) && subItem.shopPriceEmpty && !isThirdShop() }"
v-model="subItem.shopPrice" v-model="subItem.shopPrice"
:disabled="!filterEmpty(goodsInfoData.supplierCode) && goodsInfoData.supplierCode !== 12"
@input="handleShopPrice($event, subIndex)" @input="handleShopPrice($event, subIndex)"
@blur="handleShopPriceBlur($event, subIndex)"> @blur="handleShopPriceBlur($event, subIndex)">
<el-popover v-show="(filterEmpty(subItem.shopPrice) || formatPrice(subIndex)) && subItem.shopPriceEmpty" <el-popover v-show="(filterEmpty(subItem.shopPrice) || formatPrice(subIndex)) && subItem.shopPriceEmpty && !isThirdShop()"
slot="suffix" slot="suffix"
placement="top" placement="top"
title title
width="90" width="90"
trigger="hover" trigger="hover"
:content="formatPrice(subIndex) ? '成本价需≤零售价,成本价需≤最低价' : '成本是必填项'"> :content="formatPriceText(subIndex, 0)">
<i class="el-icon-warning color-red" <i class="el-icon-warning color-red"
slot="reference" /> slot="reference" />
</el-popover> </el-popover>
...@@ -320,7 +322,7 @@ ...@@ -320,7 +322,7 @@
title title
width="90" width="90"
trigger="hover" trigger="hover"
:content="formatPrice(subIndex) ? '零售价需≥成本,零售价需≥最低价' : '零售是必填项'"> :content="formatPriceText(subIndex, 1)">
<i class="el-icon-warning color-red" <i class="el-icon-warning color-red"
slot="reference" /> slot="reference" />
</el-popover> </el-popover>
...@@ -339,7 +341,7 @@ ...@@ -339,7 +341,7 @@
title title
width="90" width="90"
trigger="hover" trigger="hover"
:content="formatPrice(subIndex) ? '最低价需≥产品成本,最低价需≤零售价' : '最低价是必填项'"> :content="formatPriceText(subIndex, 2)">
<i class="el-icon-warning color-red" <i class="el-icon-warning color-red"
slot="reference" /> slot="reference" />
</el-popover> </el-popover>
...@@ -558,6 +560,7 @@ export default { ...@@ -558,6 +560,7 @@ export default {
if (this.goodsInfoData.goodsType == 1) { if (this.goodsInfoData.goodsType == 1) {
this.productPositionTypeList = positionTypeList.filter(v => this.goodsInfoData.goodsPositionList?.indexOf(v.position) > -1) this.productPositionTypeList = positionTypeList.filter(v => this.goodsInfoData.goodsPositionList?.indexOf(v.position) > -1)
} }
this.specsWidth = 100 / (this.goodsInfoData.goodsSpecificationNameList?.length + this.goodsInfoData.goodsType == 1 ? 9 : this.goodsInfoData.selectedSceneCode == 0 ? 6 : 7) + '%'
}, },
deep: true deep: true
} }
...@@ -790,12 +793,25 @@ export default { ...@@ -790,12 +793,25 @@ export default {
}) })
this.goodsInfoData.goodsSpecificationList = arr this.goodsInfoData.goodsSpecificationList = arr
}, },
// 是否是第三方商品
isThirdShop() {
return !this.filterEmpty(this.goodsInfoData.supplierCode) && this.goodsInfoData.supplierCode !== '12'
},
// 校验零售价成本价最低价关系 // 校验零售价成本价最低价关系
formatPrice(index) { formatPrice(index) {
let item = (typeof index == 'undefined') ? this.batchObj : this.goodsInfoData.goodsSpecificationList[index] let item = this.filterEmpty(index) ? this.batchObj : this.goodsInfoData.goodsSpecificationList[index]
return (!this.filterEmpty(item.shopPrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopPrice) > Number(item.shopMinPrice)) let result = (!this.filterEmpty(item.shopPrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopPrice) > Number(item.shopMinPrice))
|| (!this.filterEmpty(item.upgradePrice) && !this.filterEmpty(item.shopPrice) && Number(item.shopPrice) > Number(item.upgradePrice)) || (!this.filterEmpty(item.upgradePrice) && !this.filterEmpty(item.shopPrice) && Number(item.shopPrice) > Number(item.upgradePrice))
|| (!this.filterEmpty(item.shopMinPrice) && !this.filterEmpty(item.upgradePrice) && Number(item.shopMinPrice) > Number(item.upgradePrice)) || (!this.filterEmpty(item.shopMinPrice) && !this.filterEmpty(item.upgradePrice) && Number(item.shopMinPrice) > Number(item.upgradePrice))
let result2 = (!this.filterEmpty(item.upgradePrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopMinPrice) > Number(item.upgradePrice))
return !this.isThirdShop() ? result : result2
},
// 校验价格关系 错误提示文案
formatPriceText(index, num) {
let requiredText = ['成本是必填项', '零售价是必填项', '最低价是必填项']
let text = ['成本价需≤零售价,成本价需≤最低价', '零售价需≥成本,零售价需≥最低价', '最低价需≥产品成本,最低价需≤零售价']
let noShopPriceText = '零售价需≥最低价'
return this.formatPrice(index) ? (!this.isThirdShop() ? text[num] : noShopPriceText) : requiredText[num]
}, },
// 批量校验型号 // 批量校验型号
handleBatchTypeBlur(e) { handleBatchTypeBlur(e) {
...@@ -1054,6 +1070,9 @@ export default { ...@@ -1054,6 +1070,9 @@ export default {
padding: 0 10px; padding: 0 10px;
} }
} }
.w-80-per-noTansform{
transform: translateX(0px);
}
.color-red{ .color-red{
color: #eb4e4e; color: #eb4e4e;
font-size: 14px; font-size: 14px;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<span>可选择的服务项目(多选)</span> <span>可选择的服务项目(多选)</span>
</td> </td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<span class="color-red">*</span> <span class="color-red" v-show="!isThirdShop()">*</span>
<span>成本/元</span> <span>成本/元</span>
</td> </td>
<td :style="{ width: specsWidth }" v-show="goodsInfoData.selectedSceneCode !== 0"> <td :style="{ width: specsWidth }" v-show="goodsInfoData.selectedSceneCode !== 0">
...@@ -143,18 +143,19 @@ ...@@ -143,18 +143,19 @@
</td> </td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input placeholder="成本" <el-input placeholder="成本"
:disabled="isThirdShop()"
size="small" size="small"
:class="{ 'w-80-per': true, 'w-100-per': true, 'border-red': (filterEmpty(subItem.shopPrice) || formatPrice(subIndex)) && subItem.shopPriceEmpty }" :class="{ 'w-80-per': true, 'w-100-per': true, 'border-red': (filterEmpty(subItem.shopPrice) || formatPrice(subIndex)) && subItem.shopPriceEmpty && !isThirdShop() }"
v-model="subItem.shopPrice" v-model="subItem.shopPrice"
@input="handleShopPrice($event, subIndex)" @input="handleShopPrice($event, subIndex)"
@blur="handleShopPriceBlur($event, subIndex)"> @blur="handleShopPriceBlur($event, subIndex)">
<el-popover v-show="(filterEmpty(subItem.shopPrice) || formatPrice(subIndex)) && subItem.shopPriceEmpty" <el-popover v-show="(filterEmpty(subItem.shopPrice) || formatPrice(subIndex)) && subItem.shopPriceEmpty && !isThirdShop()"
slot="suffix" slot="suffix"
placement="top" placement="top"
title title
width="90" width="90"
trigger="hover" trigger="hover"
:content="formatPrice(subIndex) ? '成本价需≤零售价,成本价需≤最低价' : '成本是必填项'"> :content="formatPriceText(subIndex, 0)">
<i class="el-icon-warning color-red" <i class="el-icon-warning color-red"
slot="reference" /> slot="reference" />
</el-popover> </el-popover>
...@@ -192,7 +193,7 @@ ...@@ -192,7 +193,7 @@
title title
width="90" width="90"
trigger="hover" trigger="hover"
:content="formatPrice(subIndex) ? '零售价需≥成本,零售价需≥最低价' : '零售是必填项'"> :content="formatPriceText(subIndex, 1)">
<i class="el-icon-warning color-red" <i class="el-icon-warning color-red"
slot="reference" /> slot="reference" />
</el-popover> </el-popover>
...@@ -211,7 +212,7 @@ ...@@ -211,7 +212,7 @@
title title
width="90" width="90"
trigger="hover" trigger="hover"
:content="formatPrice(subIndex) ? '最低价需≥产品成本,最低价需≤零售价' : '最低价是必填项'"> :content="formatPriceText(subIndex, 2)">
<i class="el-icon-warning color-red" <i class="el-icon-warning color-red"
slot="reference" /> slot="reference" />
</el-popover> </el-popover>
...@@ -351,6 +352,8 @@ export default { ...@@ -351,6 +352,8 @@ export default {
if (this.goodsInfoData.goodsType == 1) { if (this.goodsInfoData.goodsType == 1) {
this.productPositionTypeList = positionTypeList.filter(v => this.goodsInfoData.goodsPositionList?.indexOf(v.position) > -1) this.productPositionTypeList = positionTypeList.filter(v => this.goodsInfoData.goodsPositionList?.indexOf(v.position) > -1)
} }
console.log(this.goodsInfoData)
this.specsWidth = 100 / (this.goodsInfoData.goodsType == 1 ? 9 : this.goodsInfoData.selectedSceneCode == 0 ? 6 : 7) + '%'
}, },
deep: true deep: true
} }
...@@ -441,12 +444,25 @@ export default { ...@@ -441,12 +444,25 @@ export default {
_this.$refs['specificationDataInput' + index][0].focus() _this.$refs['specificationDataInput' + index][0].focus()
}) })
}, },
// 是否是第三方商品
isThirdShop() {
return !this.filterEmpty(this.goodsInfoData.supplierCode) && this.goodsInfoData.supplierCode !== '12'
},
// 校验零售价成本价最低价关系 // 校验零售价成本价最低价关系
formatPrice(index) { formatPrice(index) {
let item = this.goodsInfoData.goodsSpecificationSingleList[index] let item = this.goodsInfoData.goodsSpecificationSingleList[index]
return (!this.filterEmpty(item.shopPrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopPrice) > Number(item.shopMinPrice)) let result = (!this.filterEmpty(item.shopPrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopPrice) > Number(item.shopMinPrice))
|| (!this.filterEmpty(item.upgradePrice) && !this.filterEmpty(item.shopPrice) && Number(item.shopPrice) > Number(item.upgradePrice)) || (!this.filterEmpty(item.upgradePrice) && !this.filterEmpty(item.shopPrice) && Number(item.shopPrice) > Number(item.upgradePrice))
|| (!this.filterEmpty(item.shopMinPrice) && !this.filterEmpty(item.upgradePrice) && Number(item.shopMinPrice) > Number(item.upgradePrice)) || (!this.filterEmpty(item.shopMinPrice) && !this.filterEmpty(item.upgradePrice) && Number(item.shopMinPrice) > Number(item.upgradePrice))
let result2 = (!this.filterEmpty(item.upgradePrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopMinPrice) > Number(item.upgradePrice))
return !this.isThirdShop() ? result : result2
},
// 校验价格关系 错误提示文案
formatPriceText(index, num) {
let requiredText = ['成本是必填项', '零售价是必填项', '最低价是必填项']
let text = ['成本价需≤零售价,成本价需≤最低价', '零售价需≥成本,零售价需≥最低价', '最低价需≥产品成本,最低价需≤零售价']
let noShopPriceText = '零售价需≥最低价'
return this.formatPrice(index) ? (!this.isThirdShop() ? text[num] : noShopPriceText) : requiredText[num]
}, },
// 校验零售价 // 校验零售价
handleUpgradePrice(newValue, index) { handleUpgradePrice(newValue, index) {
......
...@@ -139,7 +139,8 @@ export default { ...@@ -139,7 +139,8 @@ export default {
linkMerchants: [], linkMerchants: [],
speciLinkMerchants: [], speciLinkMerchants: [],
selectedSceneCode: tempVal.sceneType, selectedSceneCode: tempVal.sceneType,
serviceItems: this.productServiceItemList.map(v => {return v.serviceName})?.join(',') // 暂时不可配置 拿所有服务项目 serviceItems: this.productServiceItemList.map(v => { return v.serviceName })?.join(','), // 暂时不可配置 拿所有服务项目
supplierCode: tempVal.supplierCode
} }
this.setUpdateGoodsInfo(ObjData) this.setUpdateGoodsInfo(ObjData)
}) })
......
...@@ -129,6 +129,13 @@ export default { ...@@ -129,6 +129,13 @@ export default {
this.handleAddConfirm(this.goodsInfoData, this.goodsInfoData.specificationType, false) this.handleAddConfirm(this.goodsInfoData, this.goodsInfoData.specificationType, false)
}) })
}, },
filterEmpty(data) {
return data instanceof Array ? data.length <= 0 : (data ?? '') === ''
},
// 是否是第三方商品
isThirdShop() {
return !this.filterEmpty(this.goodsInfoData.supplierCode) && this.goodsInfoData.supplierCode !== '12'
},
handleAddConfirm(e, num, isSaved, type) { handleAddConfirm(e, num, isSaved, type) {
// num 规格类型 isSaved 提交/保存草稿 type 2保存 1 提交 tips成功提示 // num 规格类型 isSaved 提交/保存草稿 type 2保存 1 提交 tips成功提示
const data = deepClone(e) const data = deepClone(e)
...@@ -154,7 +161,7 @@ export default { ...@@ -154,7 +161,7 @@ export default {
baseGoodsId: data.baseGoodsId, baseGoodsId: data.baseGoodsId,
goodsCode: data.goodsCode, goodsCode: data.goodsCode,
id: item.id, id: item.id,
shopPrice: item.shopPrice, shopPrice: item.shopPrice || 0,
specificationData: item.specificationData, specificationData: item.specificationData,
specsValueList: [item.specificationData], specsValueList: [item.specificationData],
upgradePrice: item.upgradePrice, upgradePrice: item.upgradePrice,
...@@ -197,7 +204,7 @@ export default { ...@@ -197,7 +204,7 @@ export default {
baseGoodsId: data.baseGoodsId, baseGoodsId: data.baseGoodsId,
goodsCode: data.goodsCode, goodsCode: data.goodsCode,
id: item.id, id: item.id,
shopPrice: item.shopPrice, shopPrice: item.shopPrice || 0,
specificationData: specificationData, specificationData: specificationData,
upgradePrice: item.upgradePrice, upgradePrice: item.upgradePrice,
shopMinPrice: item.shopMinPrice, shopMinPrice: item.shopMinPrice,
...@@ -219,7 +226,8 @@ export default { ...@@ -219,7 +226,8 @@ export default {
baseGoodsName: data.specificationType == 1 ? '' : data.baseGoodsName, // 单规格没有基础商品名称 baseGoodsName: data.specificationType == 1 ? '' : data.baseGoodsName, // 单规格没有基础商品名称
goodsSpecificationNameList: goodsSpecificationNameList, goodsSpecificationNameList: goodsSpecificationNameList,
goodsSpecificationList: goodsSpecificationList, goodsSpecificationList: goodsSpecificationList,
shoppingMallFlag: data.shoppingMallFlag shoppingMallFlag: data.shoppingMallFlag,
needReview: !this.isThirdShop() // 第三方商品无需审核
} }
if (isSaved) { // 保存草稿/提交 if (isSaved) { // 保存草稿/提交
let requestEvent = type == 1 ? addOrEditBaseGoods: saveTempGoods let requestEvent = type == 1 ? addOrEditBaseGoods: saveTempGoods
......
...@@ -213,6 +213,7 @@ export default { ...@@ -213,6 +213,7 @@ export default {
goodsName: res.goodsInfo.goodsName, goodsName: res.goodsInfo.goodsName,
applicableModelNames: res.goodsInfo?.goodsType == 1 ? deepClone(applicableModelTypeList).filter(val => res.goodsInfo?.carTypeList?.indexOf(val.confId) > -1).map(item => item.confName).join('/') : '', applicableModelNames: res.goodsInfo?.goodsType == 1 ? deepClone(applicableModelTypeList).filter(val => res.goodsInfo?.carTypeList?.indexOf(val.confId) > -1).map(item => item.confName).join('/') : '',
positionNames: res.goodsInfo?.goodsType == 1 ? deepClone(positionTypeList).filter(val => selectedPositions.indexOf(val.position) > -1).map(item => item.confName).join('/') : '', positionNames: res.goodsInfo?.goodsType == 1 ? deepClone(positionTypeList).filter(val => selectedPositions.indexOf(val.position) > -1).map(item => item.confName).join('/') : '',
supplierCode: res.goodsInfo.supplierCode
} }
this.copyGoodsCode = deepClone(res.goodsInfo.goodsCode), this.copyGoodsCode = deepClone(res.goodsInfo.goodsCode),
this.setUpdateGoodsInfo(objData) this.setUpdateGoodsInfo(objData)
...@@ -274,9 +275,13 @@ export default { ...@@ -274,9 +275,13 @@ export default {
}) })
} }
}, },
// 是否是第三方商品
isThirdShop() {
return !this.filterEmpty(this.goodsInfoData.supplierCode) && this.goodsInfoData.supplierCode !== '12'
},
handleUp(num) { handleUp(num) {
this.checkGoodsInfo(num, () => { this.checkGoodsInfo(num, () => {
if (num == 1) { if (num == 1 && !this.isThirdShop()) {
this.$confirm('提交商品需要进入审核', '提示', { this.$confirm('提交商品需要进入审核', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
type: 'warning' type: 'warning'
...@@ -342,6 +347,8 @@ export default { ...@@ -342,6 +347,8 @@ export default {
specialList = ['purchasePrice', 'warrantyPeriod'] specialList = ['purchasePrice', 'warrantyPeriod']
} }
let requiredList = ['specificationData', 'shopPrice', ...specialList, 'shopMinPrice', 'upgradePrice'] let requiredList = ['specificationData', 'shopPrice', ...specialList, 'shopMinPrice', 'upgradePrice']
// 有设置供应方 且供应方是第三方(除广联直营以外的)
if (this.isThirdShop()) requiredList.splice(1, 1)
for (var i = 0; i < confirmShopData.length; i++) { for (var i = 0; i < confirmShopData.length; i++) {
const item = confirmShopData[i] const item = confirmShopData[i]
if (this.goodsInfoData.specificationType == '2') item.specificationData = item.specsValueList.join(';~;') if (this.goodsInfoData.specificationType == '2') item.specificationData = item.specsValueList.join(';~;')
...@@ -401,6 +408,10 @@ export default { ...@@ -401,6 +408,10 @@ export default {
} }
callback() callback()
}, },
// 是否是第三方商品
isThirdShop() {
return !this.filterEmpty(this.goodsInfoData.supplierCode) && this.goodsInfoData.supplierCode !== 12
},
// 校验零售价成本价最低价关系 // 校验零售价成本价最低价关系
formatPrice(item) { formatPrice(item) {
return (!this.filterEmpty(item.shopPrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopPrice) > Number(item.shopMinPrice)) return (!this.filterEmpty(item.shopPrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopPrice) > Number(item.shopMinPrice))
......
...@@ -42,6 +42,11 @@ export default { ...@@ -42,6 +42,11 @@ export default {
sceneDesc: '新车车损下单', sceneDesc: '新车车损下单',
sceneType: 0, sceneType: 0,
isOpen: 'N' isOpen: 'N'
}, {
sceneName: '售后众筹',
sceneDesc: '门店存量客户众筹团购下单',
sceneType: 3,
isOpen: 'N'
}] }]
} }
}, },
...@@ -105,7 +110,7 @@ export default { ...@@ -105,7 +110,7 @@ export default {
.scene-box{ .scene-box{
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-around; gap: 15px;
.scene-item{ .scene-item{
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -134,7 +139,7 @@ export default { ...@@ -134,7 +139,7 @@ export default {
} }
.switch-box{ .switch-box{
flex-grow: 1; flex-grow: 1;
text-align: center; text-align: right;
.switch-text{ .switch-text{
margin-top: 5px; margin-top: 5px;
font-size: 12px; font-size: 12px;
......
...@@ -36,13 +36,18 @@ ...@@ -36,13 +36,18 @@
<div <div
slot-scope="scope" slot-scope="scope"
slot="auth-button" slot="auth-button"
v-if="[1, 2, 3, 4, -1].includes(scope.scope.orderStatus)" class="btnClass"
> >
<!-- scope.scope.orderStatus == 1 || <!-- scope.scope.orderStatus == 1 ||
scope.scope.orderStatus == 2 || scope.scope.orderStatus == 2 ||
scope.scope.orderStatus == 3 || scope.scope.orderStatus == 3 ||
scope.scope.orderStatus == -1 --> scope.scope.orderStatus == -1 -->
<auth-button :data="scope.scope" /> <!-- 查看 -->
<auth-button v-if="[1, 2, 3, 4, -1].includes(scope.scope.orderStatus)" :show-btn-ids="['9040601']" :data="scope.scope" />
<!-- 打印报价单 -->
<auth-button v-if="[1, 2, 3, 4, -1].includes(scope.scope.orderStatus)" :show-btn-ids="['9040603']" :data="scope.scope" />
<!-- 打印合同 -->
<auth-button v-if="scope.scope.orderStatus" :show-btn-ids="['9040603']" :data="scope.scope" />
</div> </div>
</d2-table> </d2-table>
</div> </div>
...@@ -222,6 +227,7 @@ export default { ...@@ -222,6 +227,7 @@ export default {
window.open(res) window.open(res)
}) })
}, },
// 打印报价单
handlePrint(row) { handlePrint(row) {
quotationPrint({ id: row.id }).then((res) => { quotationPrint({ id: row.id }).then((res) => {
console.log(res) console.log(res)
...@@ -241,6 +247,13 @@ export default { ...@@ -241,6 +247,13 @@ export default {
oWin.document.close() oWin.document.close()
}) })
}, },
// 打印权益合同
handlePrintContract(row) {
// 获取权益合同PDF
quotationPrint({ id: row.id }).then((res) => {
window.open(res)
})
},
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createTime?.length) { if (this.searchForm.createTime?.length) {
...@@ -322,7 +335,7 @@ export default { ...@@ -322,7 +335,7 @@ export default {
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.count-txt { .count-txt {
font-weight: 700; font-weight: 700;
color: #2a58ad; color: #2a58ad;
...@@ -334,4 +347,9 @@ export default { ...@@ -334,4 +347,9 @@ export default {
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
} }
.btnClass {
span {
margin-right: 5px;
}
}
</style> </style>
代码合并记录 代码合并记录
dj_dev_16.0版本 dj_dev_18.0版本
代码合并操作人:张晓玮,张立顺 代码合并操作人:王琦琳,张晓伟
代码合并检查人:张杰 代码合并检查人:张杰
### 需求列表 ### 需求列表
dev_v4.16.0 版本功能需求 dev_v4.18.0 版本功能需求
...@@ -16,8 +16,8 @@ dev_v4.16.0 版本功能需求 ...@@ -16,8 +16,8 @@ dev_v4.16.0 版本功能需求
| gitlab地址 | 分支标识 | 分支创建人 | 分支合并人 | 代码检查人 | | gitlab地址 | 分支标识 | 分支创建人 | 分支合并人 | 代码检查人 |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ---------- | ---------- | ---------- | | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------- | ---------- | ---------- |
| http://192.168.3.233:8090/glsx-business/dj-car-boutique-work-wechat | [dev_v4.16.0](http://qcimg01.glsx.com.cn:7060/group1/M00/04/57/wKgD3mP9oNyAF5L3AAFf6CsJYvg142.png) | 张立顺 | 张立顺 | 张杰 | | http://192.168.3.233:8090/glsx-business/dj-car-boutique-work-wechat | [dev_v4.18.0](http://qcimg01.glsx.com.cn:7060/group1/M00/04/57/wKgD3mP9oNyAF5L3AAFf6CsJYvg142.png) | 张晓玮 | 张晓玮 | 张杰 |
| http://192.168.3.233:8090/saas_plus/dj-car-life-system | dev_v4.16.0 | 张晓玮 | 张晓玮 | 张杰 | | http://192.168.3.233:8090/saas_plus/dj-car-life-system | dev_v4.18.0 | 王琦琳 | 王琦琳 | 张杰 |
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!