|
@@ -58,7 +58,7 @@
|
|
|
<!-- 搜索条件 -->
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-row :gutter="15">
|
|
|
- <a-col :span="18">
|
|
|
+ <a-col :span="16">
|
|
|
<a-form-model :model="productForm" ref="ruleForm" layout="inline" @keyup.enter.native="$refs.table.refresh(true)" >
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="8" :sm="24">
|
|
@@ -80,14 +80,11 @@
|
|
|
</a-row>
|
|
|
</a-form-model>
|
|
|
</a-col>
|
|
|
- <a-col :span="6">
|
|
|
+ <a-col :span="8">
|
|
|
<div style="float:right;overflow: hidden;">
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- @click="delSalerOrder"
|
|
|
- :loading="delLoading"
|
|
|
- style="margin-right: 10px"
|
|
|
- id="salesEdit-del-all">整单删除</a-button>
|
|
|
+ <a-checkbox :value="0" :checked="tbForm.indexOf(0)>=0" @change="(e)=>{tbFormChange(e,0)}" id="salesQuery-tbsh">同步审核</a-checkbox>
|
|
|
+ <a-checkbox :value="1" :checked="tbForm.indexOf(1)>=0" @change="(e)=>{tbFormChange(e,1)}" id="salesQuery-tbck">同步出库</a-checkbox>
|
|
|
+ <a-checkbox :value="2" :checked="tbForm.indexOf(2)>=0" @change="(e)=>{tbFormChange(e,2)}" id="salesQuery-tbsk">同步收款</a-checkbox>
|
|
|
<a-button
|
|
|
style="padding: 0 25px;"
|
|
|
type="primary"
|
|
@@ -95,6 +92,12 @@
|
|
|
class="button-primary"
|
|
|
@click="handleSubmit()"
|
|
|
id="productInfoList-handleSubmit">提交</a-button>
|
|
|
+ <a-button
|
|
|
+ type="link"
|
|
|
+ @click="delSalerOrder"
|
|
|
+ :loading="delLoading"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ id="salesEdit-del-all">整单删除</a-button>
|
|
|
</div>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -194,22 +197,7 @@ export default {
|
|
|
productCode: '',
|
|
|
orderBy: 'sales_bill_detail.CREATE_DATE desc'
|
|
|
},
|
|
|
- // 表头
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '13%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
|
|
|
- { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '仓库', dataIndex: 'warehouseEntity.name', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '售价', dataIndex: 'price', scopedSlots: { customRender: 'price' }, width: '7%', align: 'center' },
|
|
|
- { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '7%', align: 'center' },
|
|
|
- { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '售价小计', dataIndex: 'totalAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '折后小计', dataIndex: 'discountedAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
|
- ],
|
|
|
+ tbForm: [],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -231,7 +219,30 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
printerType: 'NEEDLE', // 打印机类型
|
|
|
- isCosts: false
|
|
|
+ isCosts: false // 是否显示成本价
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const arr = [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '13%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
|
|
|
+ { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '仓库', dataIndex: 'warehouseEntity.name', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '售价', dataIndex: 'price', scopedSlots: { customRender: 'price' }, width: '7%', align: 'center' },
|
|
|
+ { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '7%', align: 'center' },
|
|
|
+ { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '售价小计', dataIndex: 'totalAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '折后小计', dataIndex: 'discountedAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
|
+ ]
|
|
|
+ if (this.isCosts) {
|
|
|
+ arr.splice(7, 0, { title: '成本价', dataIndex: 'cost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ }
|
|
|
+ return arr
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -249,6 +260,17 @@ export default {
|
|
|
_this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
+ tbFormChange (e, val) {
|
|
|
+ console.log(`checked = ${e.target.checked}`, val)
|
|
|
+ this.tbForm = []
|
|
|
+ if (e.target.checked || val == 1) {
|
|
|
+ for (let i = val; i >= 0; i--) {
|
|
|
+ this.tbForm.push(i)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.tbForm = []
|
|
|
+ }
|
|
|
+ },
|
|
|
// 编辑客户信息
|
|
|
handleEdit () {
|
|
|
this.openModal = true
|