|
@@ -24,12 +24,15 @@
|
|
|
<div style="padding: 20px;text-align: center;" v-if="dataObj&&dataObj.message">
|
|
|
{{ dataObj.message }}
|
|
|
</div>
|
|
|
- <div style="margin-top:36px;text-align:center;" v-if="modalType==='0'">
|
|
|
- <!-- <a-button @click="handleCancel" style="margin-right: 15px" id="chooseCustom-btn-back">关闭</a-button> -->
|
|
|
+ <div style="margin-top:36px;text-align:center;" v-if="modalType == 'wait_up_audit_price_less_cost'||modalType == 'audit_price_less_cost'">
|
|
|
<a-button type="primary" style="margin-right: 15px" @click="handleSubmit('AUDIT_REJECT')" id="chooseCustom-btn-noPasss">审核不通过</a-button>
|
|
|
<a-button type="primary" class="button-info" @click="handleSubmit('AUDIT_PASS')" id="chooseCustom-btn-Pass">审核通过</a-button>
|
|
|
</div>
|
|
|
- <div style="margin-top:36px;text-align:center;" v-else>
|
|
|
+ <div style="margin-top:36px;text-align:center;" v-if="modalType == 'price_less_cost'">
|
|
|
+ <a-button @click="handleCancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
|
|
|
+ <a-button type="primary" class="button-info" @click="handleSubmit('confirm')" id="chooseCustom-btn-Pass">确定</a-button>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top:36px;text-align:center;" v-if="modalType == 'price_less_0'">
|
|
|
<a-button @click="handleCancel" style="margin-right: 15px" id="chooseCustom-btn-back">关闭</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -52,10 +55,6 @@ export default {
|
|
|
default: () => {
|
|
|
return null
|
|
|
}
|
|
|
- },
|
|
|
- modalType: {// 0 来源审核页面 1来源提交页面
|
|
|
- type: String,
|
|
|
- default: '0'
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
@@ -65,34 +64,44 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ modalType () {
|
|
|
+ return this.dataObj && this.dataObj.type
|
|
|
+ },
|
|
|
dataList () {
|
|
|
- const list = this.dataObj && this.dataObj.salesPromoDetailEntityList || []
|
|
|
+ const list = this.dataObj && this.dataObj.data || []
|
|
|
list.map(item => {
|
|
|
- item.totalAmount = this.modalType == 0 ? item.promotionPrice * item.qty : item.totalAmount
|
|
|
- item.totalCostAmount = item.showCost * item.qty
|
|
|
- item.totalKsAmount = item.totalAmount - item.totalCostAmount
|
|
|
+ item.totalKsAmount = item.totalShowCost - item.totalAmount
|
|
|
})
|
|
|
return list
|
|
|
},
|
|
|
columns () {
|
|
|
const _this = this
|
|
|
- const arr = [
|
|
|
- { title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
- ]
|
|
|
- if (_this.modalType == 0) {
|
|
|
- arr.splice(2, 0, { title: '参考成本价', dataIndex: 'showCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- arr.splice(3, 0, { title: '售价', dataIndex: 'promotionPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- arr.splice(5, 0, { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
- arr.push({ title: '参考成本价小计', dataIndex: 'totalCostAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- arr.push({ title: '亏损金额', dataIndex: 'totalKsAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- } else {
|
|
|
- arr.splice(2, 0, { title: '售价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- arr.splice(4, 0, { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ // 特价产品,销售价小于等于0
|
|
|
+ if (this.modalType == 'price_less_0') {
|
|
|
+ return [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '售价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ // 特价产品,销售价是否低于成本价
|
|
|
+ if (this.modalType == 'price_less_cost' || _this.modalType == 'wait_up_audit_price_less_cost' || _this.modalType == 'audit_price_less_cost') {
|
|
|
+ return [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '参考成本价', dataIndex: 'showCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '售价', dataIndex: 'promotionPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '参考成本价小计', dataIndex: 'totalShowCost', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '亏损金额', dataIndex: 'totalKsAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
+ ]
|
|
|
}
|
|
|
- return arr
|
|
|
+ return []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|