|
@@ -6,27 +6,65 @@
|
|
|
class="sales-print-type-modal"
|
|
|
v-model="isShow"
|
|
|
@cancel="isShow=false"
|
|
|
- :width="600">
|
|
|
- <solt>提示:(销售单号: XS240717000014 客户名称:箭冠汽配武汉四新店)</solt>
|
|
|
+ :width="900">
|
|
|
+ <solt name="title" v-if="detailInfo"><div>提示:(销售单号:{{ detailInfo.salesBillNo }} 客户名称:{{ detailInfo.buyerName }})</div></solt>
|
|
|
+ <solt name="title" v-else>提示</solt>
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<div class="tipModal-content">
|
|
|
<strong class="tipModal-tit">销售单以下产品价格发生变更,请确认</strong>
|
|
|
- <s-table
|
|
|
- class="sTable fixPagination"
|
|
|
+ <a-table
|
|
|
+ class="sTable"
|
|
|
ref="table"
|
|
|
size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
+ :rowKey="(record) => record.allocateSn"
|
|
|
:columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ y: 500 }"
|
|
|
- :showPagination="false"
|
|
|
- :defaultLoadData="false"
|
|
|
+ :dataSource="dataList"
|
|
|
+ :scroll="{ y: 300 }"
|
|
|
+ :pagination="false"
|
|
|
bordered>
|
|
|
- </s-table>
|
|
|
+ <!-- 初始价 省 市 特约-->
|
|
|
+ <template slot="provincePriceOrig" slot-scope="text, record">
|
|
|
+ <span v-if="record.provincePriceOrig||record.provincePriceOrig==0">
|
|
|
+ <span :class="record.provincePriceOrig!=record.provincePrice?'redWord':''">{{ toThousands(record.provincePriceOrig) }}</span>
|
|
|
+ </span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <template slot="cityPriceOrig" slot-scope="text, record">
|
|
|
+ <span v-if="record.cityPriceOrig||record.cityPriceOrig==0">
|
|
|
+ <span :class="record.cityPriceOrig!=record.cityPrice?'redWord':''">{{ toThousands(record.cityPriceOrig) }}</span>
|
|
|
+ </span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <template slot="specialPriceOrig" slot-scope="text, record">
|
|
|
+ <span v-if="record.specialPriceOrig||record.specialPriceOrig==0">
|
|
|
+ <span :class="record.specialPriceOrig!=record.specialPrice?'redWord':''">{{ toThousands(record.specialPriceOrig) }}</span>
|
|
|
+ </span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <!-- 最新价 省 市 特约 -->
|
|
|
+ <template slot="provincePrice" slot-scope="text, record">
|
|
|
+ <span v-if="record.provincePrice||record.provincePrice==0">
|
|
|
+ <span :class="record.provincePrice!=record.provincePriceOrig?'redWord':''">{{ toThousands(record.provincePrice) }}</span>
|
|
|
+ </span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <template slot="cityPrice" slot-scope="text, record">
|
|
|
+ <span v-if="record.cityPrice||record.cityPrice==0">
|
|
|
+ <span :class="record.cityPrice!=record.cityPriceOrig?'redWord':''">{{ toThousands(record.cityPrice) }}</span>
|
|
|
+ </span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <template slot="specialPrice" slot-scope="text, record">
|
|
|
+ <span v-if="record.specialPrice||record.specialPrice==0">
|
|
|
+ <span :class="record.specialPrice!=record.specialPriceOrig?'redWord':''">{{ toThousands(record.specialPrice) }}</span>
|
|
|
+ </span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
<div>
|
|
|
<a-radio-group v-model="priceVal">
|
|
|
<a-radio :value="item.id" v-for="item in priceSelectList" :key="item.id">
|
|
|
- {{ item.name }}
|
|
|
+ {{ item.nameWord }}
|
|
|
</a-radio>
|
|
|
</a-radio-group>
|
|
|
</div>
|
|
@@ -41,18 +79,19 @@
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
-// 组件
|
|
|
-import { STable } from '@/components'
|
|
|
-// 接口
|
|
|
-import { salesDetailAddPromo } from '@/api/salesDetailNew'
|
|
|
export default {
|
|
|
- name: 'NewPromoModal',
|
|
|
+ name: 'TipModal',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { STable },
|
|
|
props: {
|
|
|
openModal: { // 弹框显示状态
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
+ },
|
|
|
+ dataList: {
|
|
|
+ type: Array,
|
|
|
+ default: () => {
|
|
|
+ return []
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
@@ -62,56 +101,78 @@ export default {
|
|
|
spinning: false,
|
|
|
newPromoSnList: [], // 新活动选项sn
|
|
|
confirmLoading: false,
|
|
|
+ detailInfo: null,
|
|
|
+ sourceData: [],
|
|
|
columns: [
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: '33%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '初始价', dataIndex: 'product.name', width: '33%', align: 'left', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '最新价', dataIndex: 'product.origCode', width: '33%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '初始价',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '省级价',
|
|
|
+ align: 'right',
|
|
|
+ dataIndex: 'provincePriceOrig',
|
|
|
+ scopedSlots: { customRender: 'provincePriceOrig' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '市级价',
|
|
|
+ align: 'right',
|
|
|
+ dataIndex: 'cityPriceOrig',
|
|
|
+ scopedSlots: { customRender: 'cityPriceOrig' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '特约价',
|
|
|
+ dataIndex: 'specialPriceOrig',
|
|
|
+ align: 'right',
|
|
|
+ scopedSlots: { customRender: 'specialPriceOrig' }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ width: '30%' },
|
|
|
+ { title: '最新价',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '省级价',
|
|
|
+ dataIndex: 'provincePrice',
|
|
|
+ align: 'right',
|
|
|
+ scopedSlots: { customRender: 'provincePrice' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '市级价',
|
|
|
+ dataIndex: 'cityPrice',
|
|
|
+ align: 'right',
|
|
|
+ scopedSlots: { customRender: 'cityPrice' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '特约价',
|
|
|
+ dataIndex: 'specialPrice',
|
|
|
+ align: 'right',
|
|
|
+ scopedSlots: { customRender: 'specialPrice' }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ width: '30%' }
|
|
|
],
|
|
|
priceSelectList: [{
|
|
|
- id: 1,
|
|
|
- name: '以【初始价】为准'
|
|
|
+ id: 0,
|
|
|
+ nameWord: '以【初始价】为准'
|
|
|
}, {
|
|
|
- id: 2,
|
|
|
- name: '以【最新价】为准'
|
|
|
+ id: 1,
|
|
|
+ nameWord: '以【最新价】为准'
|
|
|
}],
|
|
|
- priceVal: undefined,
|
|
|
- // 加载数据方法 必须为 Promise 对象
|
|
|
- loadData: parameter => {
|
|
|
- // 查询列表
|
|
|
- return salesList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
- let data
|
|
|
- if (res.status == 200) {
|
|
|
- data = res.data
|
|
|
- // 计算编号
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- data.list.forEach((con, i) => {
|
|
|
- con.no = no + i + 1
|
|
|
- })
|
|
|
- this.disabled = false
|
|
|
- }
|
|
|
- this.spinning = false
|
|
|
- return data
|
|
|
- })
|
|
|
- }
|
|
|
+ priceVal: undefined
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取弹窗显示信息
|
|
|
+ getShowInfo (obj) {
|
|
|
+ this.detailInfo = obj
|
|
|
+ },
|
|
|
// 保存
|
|
|
handleSubmit () {
|
|
|
const _this = this
|
|
|
- if (_this.newPromoSnList.length) {
|
|
|
- salesDetailAddPromo({
|
|
|
- 'salesBillSn': _this.salesBillSn,
|
|
|
- 'promoSnList': _this.newPromoSnList
|
|
|
- }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- _this.$emit('ok')
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- _this.$message.info('请选择要参与的新活动')
|
|
|
- return true
|
|
|
+ const objInfo = {
|
|
|
+ productPriceChangeFlag: _this.priceVal
|
|
|
}
|
|
|
+ _this.$emit('ok', objInfo)
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -122,6 +183,7 @@ export default {
|
|
|
isShow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
this.$emit('close')
|
|
|
+ this.priceVal = undefined
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -129,7 +191,7 @@ export default {
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
.tipModal-content{
|
|
|
- width:80%;
|
|
|
+ width:85%;
|
|
|
margin:30px auto 0;
|
|
|
text-align:center;
|
|
|
.tipModal-tit{
|
|
@@ -141,5 +203,8 @@ export default {
|
|
|
.ant-radio-wrapper:first-child{
|
|
|
margin-right:70px !important;
|
|
|
}
|
|
|
+ .redWord{
|
|
|
+ color:#ed1c24;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|