|
@@ -52,51 +52,52 @@
|
|
<div class="table-page-search-wrapper" style="position: relative;width: 100%;">
|
|
<div class="table-page-search-wrapper" style="position: relative;width: 100%;">
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
<a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
<a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
<a-form-item label="产品名称" prop="productName">
|
|
<a-form-item label="产品名称" prop="productName">
|
|
<a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
<a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
|
+ <a-form-item label="出库仓库" prop="warehouseSn">
|
|
|
|
+ <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="3" :sm="24" style="margin-bottom: 10px;">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24" style="text-align: right;">
|
|
|
|
+ <span>已选{{ selectTotal }}项</span>
|
|
|
|
+ <a-dropdown>
|
|
|
|
+ <a-menu slot="overlay" @click="handleMenuClick">
|
|
|
|
+ <a-menu-item key="0">
|
|
|
|
+ 仓库设置
|
|
|
|
+ </a-menu-item>
|
|
|
|
+ <a-menu-item key="1">
|
|
|
|
+ 删除已选项
|
|
|
|
+ </a-menu-item>
|
|
|
|
+ <a-menu-item key="2">
|
|
|
|
+ 全部删除
|
|
|
|
+ </a-menu-item>
|
|
|
|
+ </a-menu>
|
|
|
|
+ <a-button
|
|
|
|
+ style="margin:0 15px;"
|
|
|
|
+ type="primary"
|
|
|
|
+ ghost
|
|
|
|
+ id="salesEdit-plDel-btn"> 仓库设置 <a-icon type="down" /> </a-button>
|
|
|
|
+ </a-dropdown>
|
|
|
|
+ <a-button
|
|
|
|
+ type="default"
|
|
|
|
+ id="salesEdit-import-btn"
|
|
|
|
+ @click="openGuideModal=true">导入产品</a-button>
|
|
|
|
+ </a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
- <div style="position: absolute;right: 0;top: 3px;">
|
|
|
|
- <span>已选{{ selectTotal }}项</span>
|
|
|
|
- <!-- <a-button
|
|
|
|
- style="margin:0 15px;"
|
|
|
|
- size="small"
|
|
|
|
- type="danger"
|
|
|
|
- class="button-info"
|
|
|
|
- id="salesEdit-plDel-btn"
|
|
|
|
- @click="handleBatchDel">批量删除</a-button> -->
|
|
|
|
- <a-dropdown>
|
|
|
|
- <a-menu slot="overlay" @click="handleMenuClick">
|
|
|
|
- <a-menu-item key="1">
|
|
|
|
- 删除已选项
|
|
|
|
- </a-menu-item>
|
|
|
|
- <a-menu-item key="2">
|
|
|
|
- 全部删除
|
|
|
|
- </a-menu-item>
|
|
|
|
- </a-menu>
|
|
|
|
- <a-button
|
|
|
|
- style="margin:0 15px;"
|
|
|
|
- type="primary"
|
|
|
|
- ghost
|
|
|
|
- id="salesEdit-plDel-btn"> 批量删除 <a-icon type="down" /> </a-button>
|
|
|
|
- </a-dropdown>
|
|
|
|
- <a-button
|
|
|
|
- type="default"
|
|
|
|
- id="salesEdit-import-btn"
|
|
|
|
- @click="openGuideModal=true">导入产品</a-button>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -214,6 +215,8 @@
|
|
@close="closeActive"></ChooseActive>
|
|
@close="closeActive"></ChooseActive>
|
|
<!-- 导入产品 -->
|
|
<!-- 导入产品 -->
|
|
<importGuideModal :openModal="openGuideModal" :params="{salesBillSn: $route.params.sn}" @close="closeGuideModel" @ok="hanldeOk" />
|
|
<importGuideModal :openModal="openGuideModal" :params="{salesBillSn: $route.params.sn}" @close="closeGuideModel" @ok="hanldeOk" />
|
|
|
|
+ <!-- 仓库设置 -->
|
|
|
|
+ <setWarehouse :show="openWarehouseModal" @ok="chooseCustomOk" @cancel="openWarehouseModal=false"></setWarehouse>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -224,13 +227,14 @@ import queryPart from './queryPart.vue'
|
|
import queryPromotable from './queryPromotable.vue'
|
|
import queryPromotable from './queryPromotable.vue'
|
|
import ChooseActive from './chooseActive.vue'
|
|
import ChooseActive from './chooseActive.vue'
|
|
import ImportGuideModal from './importGuideModal.vue'
|
|
import ImportGuideModal from './importGuideModal.vue'
|
|
|
|
+import setWarehouse from './setWarehouse.vue'
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
import { salesModify, salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll } from '@/api/sales'
|
|
import { salesModify, salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll } from '@/api/sales'
|
|
import { salesDetailStockList, salesDetailInsert, salesDetailUpdateQty, salesDetailDel, salesDetailBatchDel, salesDetailDelAll, addPromoGoods, salesBatchInsert } from '@/api/salesDetail'
|
|
import { salesDetailStockList, salesDetailInsert, salesDetailUpdateQty, salesDetailDel, salesDetailBatchDel, salesDetailDelAll, addPromoGoods, salesBatchInsert } from '@/api/salesDetail'
|
|
export default {
|
|
export default {
|
|
name: 'SalesEdit',
|
|
name: 'SalesEdit',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, queryPart, queryPromotable, ChooseActive, ImportGuideModal, chooseWarehouse },
|
|
|
|
|
|
+ components: { STable, VSelect, queryPart, queryPromotable, ChooseActive, ImportGuideModal, chooseWarehouse, setWarehouse },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -246,6 +250,7 @@ export default {
|
|
salesBillSn: '',
|
|
salesBillSn: '',
|
|
promotionFlag: 0
|
|
promotionFlag: 0
|
|
},
|
|
},
|
|
|
|
+ openWarehouseModal: false, // 打开仓库设置
|
|
warehouseSn: undefined,
|
|
warehouseSn: undefined,
|
|
activeName: '', // 促销活动
|
|
activeName: '', // 促销活动
|
|
nowData: null,
|
|
nowData: null,
|
|
@@ -284,11 +289,12 @@ export default {
|
|
columns () {
|
|
columns () {
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '20%', align: 'center', sorter: true },
|
|
|
|
- { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: '25%', align: 'left' },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '13%', align: 'center', sorter: true },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: '20%', align: 'left' },
|
|
// { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '8%', align: 'center' },
|
|
{ title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '8%', align: 'center' },
|
|
{ title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '8%', align: 'center' },
|
|
{ title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '8%', align: 'center' },
|
|
|
|
+ { title: '出库仓库', dataIndex: 'warehouseName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
// { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
@@ -321,7 +327,9 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleMenuClick (e) {
|
|
handleMenuClick (e) {
|
|
- if (e.key == 1) { // 删除已选项
|
|
|
|
|
|
+ if (e.key == 0) { // 仓库设置
|
|
|
|
+ this.openWarehouseModal = true
|
|
|
|
+ } else if (e.key == 1) { // 删除已选项
|
|
this.handleBatchDel()
|
|
this.handleBatchDel()
|
|
} else {
|
|
} else {
|
|
this.handleBatchDelAll()
|
|
this.handleBatchDelAll()
|