增加转采购入库和转销售出库的功能

This commit is contained in:
jishenghua
2025-05-01 22:26:41 +08:00
parent 7583207640
commit f3a40d0d02
6 changed files with 104 additions and 4 deletions

View File

@@ -94,6 +94,7 @@
<div class="table-operator" style="margin-top: 5px"> <div class="table-operator" style="margin-top: 5px">
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button> <a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="delete" @click="batchDel">删除</a-button> <a-button v-if="btnEnableList.indexOf(1)>-1" icon="delete" @click="batchDel">删除</a-button>
<a-button v-if="quickBtn.purchaseIn && btnEnableList.indexOf(1)>-1" icon="share-alt" @click="transferBill('转采购入库')">转采购入库</a-button>
<a-tooltip title="可将状态是部分采购的单据强制完成"> <a-tooltip title="可将状态是部分采购的单据强制完成">
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="issues-close" @click="batchForceClose">强制结单</a-button> <a-button v-if="btnEnableList.indexOf(1)>-1" icon="issues-close" @click="batchForceClose">强制结单</a-button>
</a-tooltip> </a-tooltip>
@@ -184,6 +185,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<purchase-order-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></purchase-order-modal> <purchase-order-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></purchase-order-modal>
<purchase-in-modal ref="transferModalForm" @ok="modalFormOk" @close="modalFormClose"></purchase-in-modal>
<bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
<bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe> <bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe>
</a-card> </a-card>
@@ -193,6 +195,7 @@
<!-- by ji sheng hua--> <!-- by ji sheng hua-->
<script> <script>
import PurchaseOrderModal from './modules/PurchaseOrderModal' import PurchaseOrderModal from './modules/PurchaseOrderModal'
import PurchaseInModal from './modules/PurchaseInModal'
import BillDetail from './dialog/BillDetail' import BillDetail from './dialog/BillDetail'
import BillExcelIframe from '@/components/tools/BillExcelIframe' import BillExcelIframe from '@/components/tools/BillExcelIframe'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
@@ -205,6 +208,7 @@
mixins:[JeecgListMixin,BillListMixin], mixins:[JeecgListMixin,BillListMixin],
components: { components: {
PurchaseOrderModal, PurchaseOrderModal,
PurchaseInModal,
BillDetail, BillDetail,
BillExcelIframe, BillExcelIframe,
JEllipsis, JEllipsis,
@@ -296,6 +300,8 @@
this.initSystemConfig() this.initSystemConfig()
this.initSupplier() this.initSupplier()
this.initUser() this.initUser()
this.initQuickBtn()
this.getDepotByCurrentUser()
}, },
computed: { computed: {
}, },

View File

@@ -85,6 +85,7 @@
<div class="table-operator" style="margin-top: 5px"> <div class="table-operator" style="margin-top: 5px">
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button> <a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="delete" @click="batchDel">删除</a-button> <a-button v-if="btnEnableList.indexOf(1)>-1" icon="delete" @click="batchDel">删除</a-button>
<a-button v-if="quickBtn.purchaseIn && btnEnableList.indexOf(1)>-1" icon="share-alt" @click="transferBill('转销售出库')">转销售出库</a-button>
<a-tooltip title="可将状态是部分销售的单据强制完成"> <a-tooltip title="可将状态是部分销售的单据强制完成">
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="issues-close" @click="batchForceClose">强制结单</a-button> <a-button v-if="btnEnableList.indexOf(1)>-1" icon="issues-close" @click="batchForceClose">强制结单</a-button>
</a-tooltip> </a-tooltip>
@@ -178,6 +179,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<sale-order-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></sale-order-modal> <sale-order-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></sale-order-modal>
<sale-out-modal ref="transferModalForm" @ok="modalFormOk" @close="modalFormClose"></sale-out-modal>
<bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
<bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe> <bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe>
</a-card> </a-card>
@@ -186,6 +188,7 @@
</template> </template>
<script> <script>
import SaleOrderModal from './modules/SaleOrderModal' import SaleOrderModal from './modules/SaleOrderModal'
import SaleOutModal from './modules/SaleOutModal'
import BillDetail from './dialog/BillDetail' import BillDetail from './dialog/BillDetail'
import BillExcelIframe from '@/components/tools/BillExcelIframe' import BillExcelIframe from '@/components/tools/BillExcelIframe'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
@@ -199,6 +202,7 @@
mixins:[JeecgListMixin,BillListMixin], mixins:[JeecgListMixin,BillListMixin],
components: { components: {
SaleOrderModal, SaleOrderModal,
SaleOutModal,
BillDetail, BillDetail,
BillExcelIframe, BillExcelIframe,
JEllipsis, JEllipsis,
@@ -288,6 +292,8 @@
this.initCustomer() this.initCustomer()
this.initUser() this.initUser()
this.getSystemConfig() this.getSystemConfig()
this.initQuickBtn()
this.getDepotByCurrentUser()
}, },
computed: { computed: {
}, },

View File

@@ -19,6 +19,7 @@ export const BillListMixin = {
waitTotal: 0, waitTotal: 0,
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
billExcelUrl: '', billExcelUrl: '',
defaultDepotId: '',
supList: [], supList: [],
cusList: [], cusList: [],
retailList: [], retailList: [],
@@ -397,6 +398,14 @@ export const BillListMixin = {
{ title: '金额', dataIndex: 'allPrice'}, { title: '金额', dataIndex: 'allPrice'},
{ title: '备注', dataIndex: 'remark'} { title: '备注', dataIndex: 'remark'}
], ],
quickBtn: {
retailBack: false,
purchaseOrder: false,
purchaseIn: false,
purchaseBack: false,
saleOut: false,
saleBack: false
},
queryParam: { queryParam: {
beginTime: getPrevMonthFormatDate(3), beginTime: getPrevMonthFormatDate(3),
endTime: getFormatDate(), endTime: getFormatDate(),
@@ -684,6 +693,75 @@ export const BillListMixin = {
} }
}) })
}, },
//加载快捷按钮:转入库、转出库等
initQuickBtn() {
let btnStrList = Vue.ls.get('winBtnStrList') //按钮功能列表 JSON字符串
if (btnStrList) {
for (let i = 0; i < btnStrList.length; i++) {
if (btnStrList[i].btnStr) {
this.quickBtn.retailBack = btnStrList[i].url === '/bill/retail_back'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.retailBack
this.quickBtn.purchaseOrder = btnStrList[i].url === '/bill/purchase_order'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.purchaseOrder
this.quickBtn.purchaseIn = btnStrList[i].url === '/bill/purchase_in'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.purchaseIn
this.quickBtn.purchaseBack = btnStrList[i].url === '/bill/purchase_back'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.purchaseBack
this.quickBtn.saleOut = btnStrList[i].url === '/bill/sale_out'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.saleOut
this.quickBtn.saleBack = btnStrList[i].url === '/bill/sale_back'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.saleBack
}
}
}
},
getDepotByCurrentUser() {
getAction('/depot/findDepotByCurrentUser').then((res) => {
if (res.code === 200) {
if (res.data.length === 1) {
this.defaultDepotId = res.data[0].id+''
} else {
for (let i = 0; i < res.data.length; i++) {
if(res.data[i].isDefault){
this.defaultDepotId = res.data[i].id+''
}
}
}
}
})
},
//跳转到下一个单据页面
transferBill(type) {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录')
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning('只能选择一条记录')
} else {
let info = this.selectionRows[0]
if(info.status === '1' || info.status === '3') {
let param = {
headerId: info.id,
mpList : '',
linkType: 'basic'
}
getAction('/depotItem/getDetailList', param).then((res) => {
if (res.code === 200) {
let transferParam = {
list: res.data.rows,
number: info.number,
organId: info.organId,
discountMoney: info.discountMoney,
deposit: info.deposit,
remark: info.remark,
accountId: info.accountId,
salesMan: info.salesMan
}
this.$refs.transferModalForm.action = "add"
this.$refs.transferModalForm.transferParam = transferParam
this.$refs.transferModalForm.defaultDepotId = this.defaultDepotId
this.$refs.transferModalForm.add()
this.$refs.transferModalForm.title = type
}
})
} else {
this.$message.warning('该状态不能' + type + '')
}
}
},
//列设置更改事件 //列设置更改事件
onColChange (checkedValues) { onColChange (checkedValues) {
this.columns = this.defColumns.filter(item => { this.columns = this.defColumns.filter(item => {

View File

@@ -19,6 +19,8 @@ export const BillModalMixin = {
value: '' value: ''
}, },
currentSelectDepotId: '', currentSelectDepotId: '',
transferParam: {},
defaultDepotId: '',
depotList: [], depotList: [],
accountList: [], accountList: [],
accountIdList: [], accountIdList: [],

View File

@@ -355,6 +355,8 @@
this.fileList = [] this.fileList = []
this.$nextTick(() => { this.$nextTick(() => {
handleIntroJs(this.prefixNo, 1) handleIntroJs(this.prefixNo, 1)
let tp = this.transferParam
this.linkBillListOk(tp.list, tp.number, tp.organId, tp.discountMoney, tp.deposit, tp.remark, this.defaultDepotId, tp.accountId)
}) })
} else { } else {
if(this.model.linkNumber) { if(this.model.linkNumber) {
@@ -466,8 +468,10 @@
} }
info.linkId = info.id info.linkId = info.id
allTaxLastMoney += info.taxLastMoney allTaxLastMoney += info.taxLastMoney
listEx.push(info) if(info.operNumber>0) {
this.changeColumnShow(info) listEx.push(info)
this.changeColumnShow(info)
}
} }
this.materialTable.dataSource = listEx this.materialTable.dataSource = listEx
///给优惠后金额重新赋值 ///给优惠后金额重新赋值

View File

@@ -371,6 +371,8 @@
this.fileList = [] this.fileList = []
this.$nextTick(() => { this.$nextTick(() => {
handleIntroJs(this.prefixNo, 1) handleIntroJs(this.prefixNo, 1)
let tp = this.transferParam
this.linkBillListOk(tp.list, tp.number, tp.organId, tp.discountMoney, tp.deposit, tp.remark, this.defaultDepotId, tp.accountId, tp.salesMan)
}) })
} else { } else {
if(this.model.linkNumber) { if(this.model.linkNumber) {
@@ -483,8 +485,10 @@
} }
info.linkId = info.id info.linkId = info.id
allTaxLastMoney += info.taxLastMoney allTaxLastMoney += info.taxLastMoney
listEx.push(info) if(info.operNumber>0) {
this.changeColumnShow(info) listEx.push(info)
this.changeColumnShow(info)
}
} }
this.materialTable.dataSource = listEx this.materialTable.dataSource = listEx
///给优惠后金额重新赋值 ///给优惠后金额重新赋值