优化收款单
This commit is contained in:
@@ -406,7 +406,7 @@
|
||||
@mouseout="()=>{handleMouseoutCommono(row,col)}">
|
||||
|
||||
<j-select-material
|
||||
:multi="false"
|
||||
:multi="col.multi"
|
||||
:value="getPopupJshValue(id)"
|
||||
@change="(v)=>handleChangePopupJshCommon(v,id,row,col,rowIndex)" />
|
||||
</span>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '12%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '12%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '10%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '10%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '10%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh,
|
||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '8%', type: FormTypes.input, readonly: true },
|
||||
|
||||
147
jshERP-web/src/views/financial/dialog/DebtBillList.vue
Normal file
147
jshERP-web/src/views/financial/dialog/DebtBillList.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="1000"
|
||||
:visible="visible"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭"
|
||||
wrapClassName="ant-modal-cust-warp"
|
||||
style="top:5%;height: 100%;overflow-y: hidden">
|
||||
<!-- table区域-begin -->
|
||||
<a-table
|
||||
bordered
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: getType}"
|
||||
:customRow="rowAction">
|
||||
</a-table>
|
||||
<!-- table区域-end -->
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
export default {
|
||||
name: 'DebtBillList',
|
||||
mixins:[JeecgListMixin],
|
||||
data () {
|
||||
return {
|
||||
title: "操作",
|
||||
visible: false,
|
||||
disableMixinCreated: true,
|
||||
selectedRowKeys: [],
|
||||
selectionRows: [],
|
||||
selectBillRows: [],
|
||||
selectBillIds: '',
|
||||
queryParam: {
|
||||
number: "",
|
||||
searchMaterial: "",
|
||||
type: "",
|
||||
subType: "",
|
||||
status: ""
|
||||
},
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'rowIndex',
|
||||
width:40,
|
||||
align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{ title: '', dataIndex: 'organName',width:120},
|
||||
{ title: '单据编号', dataIndex: 'number',width:150},
|
||||
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true,
|
||||
customRender:function (text,record,index) {
|
||||
if(text) {
|
||||
return text.replace(",",",");
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '单据日期', dataIndex: 'operTimeStr',width:145},
|
||||
{ title: '操作员', dataIndex: 'userName',width:60},
|
||||
{ title: '金额合计', dataIndex: 'totalPrice',width:70}
|
||||
],
|
||||
url: {
|
||||
list: "/depotHead/list"
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getType: function () {
|
||||
return 'checkbox';
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
show(type, subType, organType, status) {
|
||||
this.queryParam.type = type
|
||||
this.queryParam.subType = subType
|
||||
this.queryParam.status = status
|
||||
this.columns[1].title = organType
|
||||
this.model = Object.assign({}, {});
|
||||
this.visible = true;
|
||||
this.loadData(1)
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectionRows) {
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
this.selectionRows = selectionRows;
|
||||
},
|
||||
handleOk () {
|
||||
this.getSelectBillRows();
|
||||
this.$emit('ok', this.selectBillRows);
|
||||
this.close();
|
||||
},
|
||||
getSelectBillRows() {
|
||||
let dataSource = this.dataSource;
|
||||
let billIds = "";
|
||||
this.selectBillRows = [];
|
||||
for (let i = 0, len = dataSource.length; i < len; i++) {
|
||||
if (this.selectedRowKeys.includes(dataSource[i].id)) {
|
||||
this.selectBillRows.push(dataSource[i]);
|
||||
billIds = billIds + "," + dataSource[i].id
|
||||
}
|
||||
}
|
||||
this.selectBillIds = billIds.substring(1);
|
||||
},
|
||||
rowAction(record, index) {
|
||||
return {
|
||||
on: {
|
||||
click: () => {
|
||||
let arr = []
|
||||
arr.push(record.id)
|
||||
this.selectedRowKeys = arr
|
||||
},
|
||||
dblclick: () => {
|
||||
let arr = []
|
||||
arr.push(record.id)
|
||||
this.selectedRowKeys = arr
|
||||
this.handleOk()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -404,7 +404,7 @@
|
||||
{ title: '备注',dataIndex: 'remark', width: '30%'}
|
||||
],
|
||||
moneyInColumns: [
|
||||
{ title: '账户名称',dataIndex: 'accountName',width: '20%'},
|
||||
{ title: '销售单据编号',dataIndex: 'billNumber',width: '20%'},
|
||||
{ title: '金额',dataIndex: 'eachAmount', width: '10%'},
|
||||
{ title: '备注',dataIndex: 'remark', width: '30%'}
|
||||
],
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
@@ -44,6 +45,18 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row class="form-row" :gutter="24">
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<!-- 操作按钮 -->
|
||||
<div class="action-button">
|
||||
<a-button type="primary" icon="plus" @click="handleClickAdd">批量新增</a-button>
|
||||
<span class="gap"></span>
|
||||
<a-button type="primary" icon="minus" @click="handleClear">清空</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row class="form-row" :gutter="24">
|
||||
<a-col :span="24">
|
||||
<j-editable-table
|
||||
:ref="refKeys[0]"
|
||||
:loading="accountTable.loading"
|
||||
@@ -51,8 +64,10 @@
|
||||
:dataSource="accountTable.dataSource"
|
||||
:maxHeight="300"
|
||||
:rowNumber="false"
|
||||
:rowSelection="true"
|
||||
:actionButton="true" />
|
||||
:rowSelection="false"
|
||||
:actionButton="false" />
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row class="form-row" :gutter="24">
|
||||
<a-col :lg="24" :md="24" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
||||
@@ -76,17 +91,22 @@
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
<debt-bill-list ref="debtBillList" @ok="debtBillListOk"></debt-bill-list>
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import DebtBillList from '../dialog/DebtBillList'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
import Vue from 'vue'
|
||||
export default {
|
||||
name: "MoneyInModal",
|
||||
mixins: [JEditableTableMixin, FinancialModalMixin],
|
||||
components: {
|
||||
DebtBillList,
|
||||
JDate
|
||||
},
|
||||
data () {
|
||||
@@ -95,7 +115,7 @@
|
||||
width: '1200px',
|
||||
moreStatus: false,
|
||||
// 新增时子表默认添加几行空数据
|
||||
addDefaultRowNum: 1,
|
||||
addDefaultRowNum: 0,
|
||||
visible: false,
|
||||
model: {},
|
||||
labelCol: {
|
||||
@@ -112,9 +132,7 @@
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
columns: [
|
||||
{ title: '账户名称',key: 'accountId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '销售单据编号',key: 'billNumber',width: '20%', type: FormTypes.input, readonly: true },
|
||||
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}',
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
@@ -179,10 +197,41 @@
|
||||
info: JSON.stringify(billMain),
|
||||
rows: JSON.stringify(detailArr),
|
||||
}
|
||||
},
|
||||
handleClickAdd() {
|
||||
this.$refs.debtBillList.show('出库', '销售', '客户', "0")
|
||||
this.$refs.debtBillList.title = "选择销售出库"
|
||||
},
|
||||
handleClear() {
|
||||
this.accountTable.dataSource = []
|
||||
},
|
||||
debtBillListOk(selectBillRows) {
|
||||
if(selectBillRows && selectBillRows.length>0) {
|
||||
this.requestSubTableDataEx(selectBillRows, this.accountTable);
|
||||
}
|
||||
},
|
||||
/** 查询某个tab的数据,给明细里面的价税合计赋值 */
|
||||
requestSubTableDataEx(selectBillRows, tab, success) {
|
||||
tab.loading = true
|
||||
let listEx = []
|
||||
for(let i=0; i<selectBillRows.length; i++){
|
||||
let info = selectBillRows[i]
|
||||
info.billNumber = info.number
|
||||
info.eachAmount = info.totalPrice
|
||||
listEx.push(info)
|
||||
}
|
||||
tab.dataSource = listEx
|
||||
typeof success === 'function' ? success(res) : ''
|
||||
tab.loading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
.action-button {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.gap {
|
||||
padding-left: 8px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user