给其它入库和其它出库单据增加关联单据的功能,支持全部和部分关联
This commit is contained in:
@@ -219,7 +219,12 @@
|
|||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
{ title: '供应商', dataIndex: 'organName',width:120, ellipsis:true},
|
{ title: '供应商', dataIndex: 'organName',width:120, ellipsis:true},
|
||||||
{ title: '单据编号', dataIndex: 'number',width:160},
|
{ title: '单据编号', dataIndex: 'number',width:160,
|
||||||
|
customRender:function (text,record,index) {
|
||||||
|
text = record.linkNumber?text+"[转]":text
|
||||||
|
return text
|
||||||
|
}
|
||||||
|
},
|
||||||
{ title: '关联单据', dataIndex: 'linkNumber',width:140},
|
{ title: '关联单据', dataIndex: 'linkNumber',width:140},
|
||||||
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true},
|
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true},
|
||||||
{ title: '单据日期', dataIndex: 'operTimeStr',width:145},
|
{ title: '单据日期', dataIndex: 'operTimeStr',width:145},
|
||||||
|
|||||||
@@ -219,7 +219,12 @@
|
|||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
{ title: '客户', dataIndex: 'organName',width:120, ellipsis:true},
|
{ title: '客户', dataIndex: 'organName',width:120, ellipsis:true},
|
||||||
{ title: '单据编号', dataIndex: 'number',width:160},
|
{ title: '单据编号', dataIndex: 'number',width:160,
|
||||||
|
customRender:function (text,record,index) {
|
||||||
|
text = record.linkNumber?text+"[转]":text
|
||||||
|
return text
|
||||||
|
}
|
||||||
|
},
|
||||||
{ title: '关联单据', dataIndex: 'linkNumber',width:140},
|
{ title: '关联单据', dataIndex: 'linkNumber',width:140},
|
||||||
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true},
|
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true},
|
||||||
{ title: '单据日期', dataIndex: 'operTimeStr',width:145},
|
{ title: '单据日期', dataIndex: 'operTimeStr',width:145},
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
|
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
|
||||||
<a-select-option v-for="(depot,index) in depotList" :value="depot.id">
|
<a-select-option v-for="(depot,index) in depotList" :key="index" :value="depot.id">
|
||||||
{{ depot.depotName }}
|
{{ depot.depotName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -86,6 +86,8 @@
|
|||||||
<a-select placeholder="选择单据状态" v-model="queryParam.status">
|
<a-select placeholder="选择单据状态" v-model="queryParam.status">
|
||||||
<a-select-option value="0">未审核</a-select-option>
|
<a-select-option value="0">未审核</a-select-option>
|
||||||
<a-select-option value="1">已审核</a-select-option>
|
<a-select-option value="1">已审核</a-select-option>
|
||||||
|
<a-select-option value="3">部分出库</a-select-option>
|
||||||
|
<a-select-option value="2">完成出库</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -161,6 +163,8 @@
|
|||||||
<template slot="customRenderStatus" slot-scope="status">
|
<template slot="customRenderStatus" slot-scope="status">
|
||||||
<a-tag v-if="status == '0'" color="red">未审核</a-tag>
|
<a-tag v-if="status == '0'" color="red">未审核</a-tag>
|
||||||
<a-tag v-if="status == '1'" color="green">已审核</a-tag>
|
<a-tag v-if="status == '1'" color="green">已审核</a-tag>
|
||||||
|
<a-tag v-if="status == '2'" color="cyan">完成出库</a-tag>
|
||||||
|
<a-tag v-if="status == '3'" color="blue">部分出库</a-tag>
|
||||||
<a-tag v-if="status == '9'" color="orange">审核中</a-tag>
|
<a-tag v-if="status == '9'" color="orange">审核中</a-tag>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
|
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
|
||||||
<a-select-option v-for="(depot,index) in depotList" :value="depot.id">
|
<a-select-option v-for="(depot,index) in depotList" :key="index" :value="depot.id">
|
||||||
{{ depot.depotName }}
|
{{ depot.depotName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -94,6 +94,8 @@
|
|||||||
<a-select placeholder="选择单据状态" v-model="queryParam.status">
|
<a-select placeholder="选择单据状态" v-model="queryParam.status">
|
||||||
<a-select-option value="0">未审核</a-select-option>
|
<a-select-option value="0">未审核</a-select-option>
|
||||||
<a-select-option value="1">已审核</a-select-option>
|
<a-select-option value="1">已审核</a-select-option>
|
||||||
|
<a-select-option value="3">部分入库</a-select-option>
|
||||||
|
<a-select-option value="2">完成入库</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -180,6 +182,8 @@
|
|||||||
<template slot="customRenderStatus" slot-scope="status">
|
<template slot="customRenderStatus" slot-scope="status">
|
||||||
<a-tag v-if="status == '0'" color="red">未审核</a-tag>
|
<a-tag v-if="status == '0'" color="red">未审核</a-tag>
|
||||||
<a-tag v-if="status == '1'" color="green">已审核</a-tag>
|
<a-tag v-if="status == '1'" color="green">已审核</a-tag>
|
||||||
|
<a-tag v-if="status == '2'" color="cyan">完成入库</a-tag>
|
||||||
|
<a-tag v-if="status == '3'" color="blue">部分入库</a-tag>
|
||||||
<a-tag v-if="status == '9'" color="orange">审核中</a-tag>
|
<a-tag v-if="status == '9'" color="orange">审核中</a-tag>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
|
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
|
||||||
<a-select-option v-for="(depot,index) in depotList" :value="depot.id">
|
<a-select-option v-for="(depot,index) in depotList" :key="index" :value="depot.id">
|
||||||
{{ depot.depotName }}
|
{{ depot.depotName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -87,6 +87,8 @@
|
|||||||
<a-select placeholder="选择单据状态" v-model="queryParam.status">
|
<a-select placeholder="选择单据状态" v-model="queryParam.status">
|
||||||
<a-select-option value="0">未审核</a-select-option>
|
<a-select-option value="0">未审核</a-select-option>
|
||||||
<a-select-option value="1">已审核</a-select-option>
|
<a-select-option value="1">已审核</a-select-option>
|
||||||
|
<a-select-option value="3">部分入库</a-select-option>
|
||||||
|
<a-select-option value="2">完成入库</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -162,6 +164,8 @@
|
|||||||
<template slot="customRenderStatus" slot-scope="status">
|
<template slot="customRenderStatus" slot-scope="status">
|
||||||
<a-tag v-if="status == '0'" color="red">未审核</a-tag>
|
<a-tag v-if="status == '0'" color="red">未审核</a-tag>
|
||||||
<a-tag v-if="status == '1'" color="green">已审核</a-tag>
|
<a-tag v-if="status == '1'" color="green">已审核</a-tag>
|
||||||
|
<a-tag v-if="status == '2'" color="cyan">完成入库</a-tag>
|
||||||
|
<a-tag v-if="status == '3'" color="blue">部分入库</a-tag>
|
||||||
<a-tag v-if="status == '9'" color="orange">审核中</a-tag>
|
<a-tag v-if="status == '9'" color="orange">审核中</a-tag>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
|
<a-select placeholder="请选择仓库" showSearch optionFilterProp="children" v-model="queryParam.depotId">
|
||||||
<a-select-option v-for="(depot,index) in depotList" :value="depot.id">
|
<a-select-option v-for="(depot,index) in depotList" :key="index" :value="depot.id">
|
||||||
{{ depot.depotName }}
|
{{ depot.depotName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -95,6 +95,8 @@
|
|||||||
<a-select placeholder="选择单据状态" v-model="queryParam.status">
|
<a-select placeholder="选择单据状态" v-model="queryParam.status">
|
||||||
<a-select-option value="0">未审核</a-select-option>
|
<a-select-option value="0">未审核</a-select-option>
|
||||||
<a-select-option value="1">已审核</a-select-option>
|
<a-select-option value="1">已审核</a-select-option>
|
||||||
|
<a-select-option value="3">部分出库</a-select-option>
|
||||||
|
<a-select-option value="2">完成出库</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -181,6 +183,8 @@
|
|||||||
<template slot="customRenderStatus" slot-scope="status">
|
<template slot="customRenderStatus" slot-scope="status">
|
||||||
<a-tag v-if="status == '0'" color="red">未审核</a-tag>
|
<a-tag v-if="status == '0'" color="red">未审核</a-tag>
|
||||||
<a-tag v-if="status == '1'" color="green">已审核</a-tag>
|
<a-tag v-if="status == '1'" color="green">已审核</a-tag>
|
||||||
|
<a-tag v-if="status == '2'" color="cyan">完成出库</a-tag>
|
||||||
|
<a-tag v-if="status == '3'" color="blue">部分出库</a-tag>
|
||||||
<a-tag v-if="status == '9'" color="orange">审核中</a-tag>
|
<a-tag v-if="status == '9'" color="orange">审核中</a-tag>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|||||||
@@ -1248,6 +1248,7 @@
|
|||||||
{ title: '有效期', dataIndex: 'expirationDate'},
|
{ title: '有效期', dataIndex: 'expirationDate'},
|
||||||
{ title: '多属性', dataIndex: 'sku'},
|
{ title: '多属性', dataIndex: 'sku'},
|
||||||
{ title: '数量', dataIndex: 'operNumber'},
|
{ title: '数量', dataIndex: 'operNumber'},
|
||||||
|
{ title: '已入库', dataIndex: 'finishNumber'},
|
||||||
{ title: '单价', dataIndex: 'unitPrice'},
|
{ title: '单价', dataIndex: 'unitPrice'},
|
||||||
{ title: '金额', dataIndex: 'allPrice'},
|
{ title: '金额', dataIndex: 'allPrice'},
|
||||||
{ title: '税率(%)', dataIndex: 'taxRate'},
|
{ title: '税率(%)', dataIndex: 'taxRate'},
|
||||||
@@ -1271,6 +1272,7 @@
|
|||||||
{ title: '有效期', dataIndex: 'expirationDate'},
|
{ title: '有效期', dataIndex: 'expirationDate'},
|
||||||
{ title: '多属性', dataIndex: 'sku'},
|
{ title: '多属性', dataIndex: 'sku'},
|
||||||
{ title: '数量', dataIndex: 'operNumber'},
|
{ title: '数量', dataIndex: 'operNumber'},
|
||||||
|
{ title: '已出库', dataIndex: 'finishNumber'},
|
||||||
{ title: '单价', dataIndex: 'unitPrice'},
|
{ title: '单价', dataIndex: 'unitPrice'},
|
||||||
{ title: '金额', dataIndex: 'allPrice'},
|
{ title: '金额', dataIndex: 'allPrice'},
|
||||||
{ title: '税率(%)', dataIndex: 'taxRate'},
|
{ title: '税率(%)', dataIndex: 'taxRate'},
|
||||||
@@ -1313,6 +1315,7 @@
|
|||||||
{ title: '有效期', dataIndex: 'expirationDate'},
|
{ title: '有效期', dataIndex: 'expirationDate'},
|
||||||
{ title: '多属性', dataIndex: 'sku'},
|
{ title: '多属性', dataIndex: 'sku'},
|
||||||
{ title: '数量', dataIndex: 'operNumber'},
|
{ title: '数量', dataIndex: 'operNumber'},
|
||||||
|
{ title: '已出库', dataIndex: 'finishNumber'},
|
||||||
{ title: '单价', dataIndex: 'unitPrice'},
|
{ title: '单价', dataIndex: 'unitPrice'},
|
||||||
{ title: '金额', dataIndex: 'allPrice'},
|
{ title: '金额', dataIndex: 'allPrice'},
|
||||||
{ title: '税率(%)', dataIndex: 'taxRate'},
|
{ title: '税率(%)', dataIndex: 'taxRate'},
|
||||||
@@ -1336,6 +1339,7 @@
|
|||||||
{ title: '有效期', dataIndex: 'expirationDate'},
|
{ title: '有效期', dataIndex: 'expirationDate'},
|
||||||
{ title: '多属性', dataIndex: 'sku'},
|
{ title: '多属性', dataIndex: 'sku'},
|
||||||
{ title: '数量', dataIndex: 'operNumber'},
|
{ title: '数量', dataIndex: 'operNumber'},
|
||||||
|
{ title: '已入库', dataIndex: 'finishNumber'},
|
||||||
{ title: '单价', dataIndex: 'unitPrice'},
|
{ title: '单价', dataIndex: 'unitPrice'},
|
||||||
{ title: '金额', dataIndex: 'allPrice'},
|
{ title: '金额', dataIndex: 'allPrice'},
|
||||||
{ title: '税率(%)', dataIndex: 'taxRate'},
|
{ title: '税率(%)', dataIndex: 'taxRate'},
|
||||||
@@ -1616,11 +1620,17 @@
|
|||||||
this.form.setFieldsValue(pick(this.model, 'id'))
|
this.form.setFieldsValue(pick(this.model, 'id'))
|
||||||
});
|
});
|
||||||
let showType = 'basic'
|
let showType = 'basic'
|
||||||
|
if(item.subType === '采购' || item.subType === '采购退货' || item.subType === '销售' || item.subType === '销售退货') {
|
||||||
|
if (item.status === '3') {
|
||||||
|
showType = 'other'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (item.status === '3') {
|
if (item.status === '3') {
|
||||||
showType = 'basic'
|
showType = 'basic'
|
||||||
} else if (item.purchaseStatus === '3') {
|
} else if (item.purchaseStatus === '3') {
|
||||||
showType = 'purchase'
|
showType = 'purchase'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
let isReadOnly = '1'
|
let isReadOnly = '1'
|
||||||
if(item.subType === '组装单' || item.subType === '拆卸单') {
|
if(item.subType === '组装单' || item.subType === '拆卸单') {
|
||||||
isReadOnly = '0'
|
isReadOnly = '0'
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
show(type, subType, status) {
|
show(type, subType, status) {
|
||||||
this.selectType = 'list'
|
this.selectType = 'list'
|
||||||
this.showType = 'basic'
|
this.showType = 'other'
|
||||||
this.queryParam.type = type
|
this.queryParam.type = type
|
||||||
this.queryParam.subType = subType
|
this.queryParam.subType = subType
|
||||||
this.queryParam.status = status
|
this.queryParam.status = status
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
} else {
|
} else {
|
||||||
if(this.selectedDetailRowKeys.length) {
|
if(this.selectedDetailRowKeys.length) {
|
||||||
this.getSelectBillDetailRows()
|
this.getSelectBillDetailRows()
|
||||||
this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.organId, this.discountMoney, this.deposit, this.remark)
|
this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.remark)
|
||||||
this.close()
|
this.close()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning('抱歉,请选择单据明细!')
|
this.$message.warning('抱歉,请选择单据明细!')
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
|
||||||
<a-select placeholder="选择供应商" v-decorator="[ 'organId' ]"
|
<a-select placeholder="选择供应商" v-decorator="[ 'organId' ]" :disabled="!rowCanEdit"
|
||||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||||
<div slot="dropdownRender" slot-scope="menu">
|
<div slot="dropdownRender" slot-scope="menu">
|
||||||
<v-nodes :vnodes="menu" />
|
<v-nodes :vnodes="menu" />
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item v-if="inOutManageFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="待入库单据">
|
<a-form-item v-if="inOutManageFlag && !model.billType" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
|
||||||
<a-input-search placeholder="请选择待入库单据" v-decorator="[ 'linkNumber' ]" @search="onSearchLinkNumber" :readOnly="true"/>
|
<a-input-search placeholder="请选择待入库单据" v-decorator="[ 'linkNumber' ]" @search="onSearchLinkNumber" :readOnly="true"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -59,14 +59,14 @@
|
|||||||
:minWidth="minWidth"
|
:minWidth="minWidth"
|
||||||
:maxHeight="300"
|
:maxHeight="300"
|
||||||
:rowNumber="false"
|
:rowNumber="false"
|
||||||
:rowSelection="true"
|
:rowSelection="rowCanEdit"
|
||||||
:actionButton="true"
|
:actionButton="rowCanEdit"
|
||||||
:dragSort="true"
|
:dragSort="rowCanEdit"
|
||||||
@valueChange="onValueChange"
|
@valueChange="onValueChange"
|
||||||
@added="onAdded"
|
@added="onAdded"
|
||||||
@deleted="onDeleted">
|
@deleted="onDeleted">
|
||||||
<template #buttonAfter>
|
<template #buttonAfter>
|
||||||
<a-row :gutter="24" style="float:left;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
|
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
|
||||||
<a-col v-if="scanStatus" :md="6" :sm="24">
|
<a-col v-if="scanStatus" :md="6" :sm="24">
|
||||||
<a-button @click="scanEnter">扫码录入</a-button>
|
<a-button @click="scanEnter">扫码录入</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<a-button @click="stopScan">收起扫码</a-button>
|
<a-button @click="stopScan">收起扫码</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
||||||
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
||||||
</a-row>
|
</a-row>
|
||||||
</template>
|
</template>
|
||||||
@@ -156,6 +156,7 @@
|
|||||||
operTimeStr: '',
|
operTimeStr: '',
|
||||||
prefixNo: 'QTRK',
|
prefixNo: 'QTRK',
|
||||||
fileList:[],
|
fileList:[],
|
||||||
|
rowCanEdit: true,
|
||||||
//出入库管理开关,适合独立仓管场景
|
//出入库管理开关,适合独立仓管场景
|
||||||
inOutManageFlag: false,
|
inOutManageFlag: false,
|
||||||
model: {},
|
model: {},
|
||||||
@@ -190,12 +191,15 @@
|
|||||||
{ title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.input },
|
{ title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.input },
|
||||||
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.date },
|
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.date },
|
||||||
{ title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
|
{ title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
|
||||||
|
{ title: '原数量', key: 'preNumber', width: '4%', type: FormTypes.normal },
|
||||||
|
{ title: '已入库', key: 'finishNumber', width: '4%', type: FormTypes.normal },
|
||||||
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber},
|
{ title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber},
|
||||||
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
|
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
|
||||||
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input }
|
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input },
|
||||||
|
{ title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
@@ -225,18 +229,25 @@
|
|||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
this.currentSelectDepotId = ''
|
this.currentSelectDepotId = ''
|
||||||
|
this.rowCanEdit = true
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0)
|
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0)
|
||||||
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
||||||
|
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
||||||
if (this.action === 'add') {
|
if (this.action === 'add') {
|
||||||
this.addInit(this.prefixNo)
|
this.addInit(this.prefixNo)
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
} else {
|
} else {
|
||||||
|
if(this.model.linkNumber) {
|
||||||
|
this.rowCanEdit = false
|
||||||
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
|
}
|
||||||
this.model.operTime = this.model.operTimeStr
|
this.model.operTime = this.model.operTimeStr
|
||||||
this.fileList = this.model.fileName
|
this.fileList = this.model.fileName
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'remark',
|
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
|
||||||
'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount'))
|
'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount'))
|
||||||
});
|
});
|
||||||
// 加载子表数据
|
// 加载子表数据
|
||||||
@@ -288,14 +299,13 @@
|
|||||||
this.$refs.waitBillList.show('入库', '采购,销售退货', "1,3")
|
this.$refs.waitBillList.show('入库', '采购,销售退货', "1,3")
|
||||||
this.$refs.waitBillList.title = "选择采购入库或销售退货"
|
this.$refs.waitBillList.title = "选择采购入库或销售退货"
|
||||||
},
|
},
|
||||||
waitBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, deposit, remark) {
|
waitBillListOk(selectBillDetailRows, linkNumber, remark) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
||||||
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
||||||
let listEx = []
|
let listEx = []
|
||||||
let allTaxLastMoney = 0
|
|
||||||
for(let j=0; j<selectBillDetailRows.length; j++) {
|
for(let j=0; j<selectBillDetailRows.length; j++) {
|
||||||
let info = selectBillDetailRows[j];
|
let info = selectBillDetailRows[j];
|
||||||
if(info.finishNumber>0) {
|
if(info.finishNumber>0) {
|
||||||
@@ -304,32 +314,13 @@
|
|||||||
info.unitPrice = 0
|
info.unitPrice = 0
|
||||||
info.allPrice = 0
|
info.allPrice = 0
|
||||||
info.linkId = info.id
|
info.linkId = info.id
|
||||||
allTaxLastMoney += info.taxLastMoney
|
|
||||||
listEx.push(info)
|
listEx.push(info)
|
||||||
this.changeColumnShow(info)
|
this.changeColumnShow(info)
|
||||||
}
|
}
|
||||||
this.materialTable.dataSource = listEx
|
this.materialTable.dataSource = listEx
|
||||||
///给优惠后金额重新赋值
|
|
||||||
allTaxLastMoney = allTaxLastMoney?allTaxLastMoney:0
|
|
||||||
let discount = 0
|
|
||||||
if(allTaxLastMoney!==0) {
|
|
||||||
discount = (discountMoney / allTaxLastMoney * 100).toFixed(2) - 0
|
|
||||||
}
|
|
||||||
let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0
|
|
||||||
let changeAmount = discountLastMoney
|
|
||||||
if(deposit) {
|
|
||||||
this.depositStatus = true
|
|
||||||
changeAmount = (discountLastMoney - deposit).toFixed(2)-0
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue({
|
this.form.setFieldsValue({
|
||||||
'organId': organId,
|
|
||||||
'linkNumber': linkNumber,
|
'linkNumber': linkNumber,
|
||||||
'discount': discount,
|
|
||||||
'discountMoney': discountMoney,
|
|
||||||
'discountLastMoney': discountLastMoney,
|
|
||||||
'deposit': deposit,
|
|
||||||
'changeAmount': changeAmount,
|
|
||||||
'remark': remark
|
'remark': remark
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
|
||||||
<a-select placeholder="选择客户" v-decorator="[ 'organId' ]"
|
<a-select placeholder="选择客户" v-decorator="[ 'organId' ]" :disabled="!rowCanEdit"
|
||||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children" @change="handleOrganChange">
|
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children" @change="handleOrganChange">
|
||||||
<div slot="dropdownRender" slot-scope="menu">
|
<div slot="dropdownRender" slot-scope="menu">
|
||||||
<v-nodes :vnodes="menu" />
|
<v-nodes :vnodes="menu" />
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item v-if="inOutManageFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="待出库单据">
|
<a-form-item v-if="inOutManageFlag && !model.billType" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
|
||||||
<a-input-search placeholder="请选择待出库单据" v-decorator="[ 'linkNumber' ]" @search="onSearchLinkNumber" :readOnly="true"/>
|
<a-input-search placeholder="请选择待出库单据" v-decorator="[ 'linkNumber' ]" @search="onSearchLinkNumber" :readOnly="true"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -59,14 +59,14 @@
|
|||||||
:minWidth="minWidth"
|
:minWidth="minWidth"
|
||||||
:maxHeight="300"
|
:maxHeight="300"
|
||||||
:rowNumber="false"
|
:rowNumber="false"
|
||||||
:rowSelection="true"
|
:rowSelection="rowCanEdit"
|
||||||
:actionButton="true"
|
:actionButton="rowCanEdit"
|
||||||
:dragSort="true"
|
:dragSort="rowCanEdit"
|
||||||
@valueChange="onValueChange"
|
@valueChange="onValueChange"
|
||||||
@added="onAdded"
|
@added="onAdded"
|
||||||
@deleted="onDeleted">
|
@deleted="onDeleted">
|
||||||
<template #buttonAfter>
|
<template #buttonAfter>
|
||||||
<a-row :gutter="24" style="float:left;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
|
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
|
||||||
<a-col v-if="scanStatus" :md="6" :sm="24">
|
<a-col v-if="scanStatus" :md="6" :sm="24">
|
||||||
<a-button @click="scanEnter">扫码录入</a-button>
|
<a-button @click="scanEnter">扫码录入</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<a-button @click="stopScan">收起扫码</a-button>
|
<a-button @click="stopScan">收起扫码</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
||||||
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
||||||
</a-row>
|
</a-row>
|
||||||
</template>
|
</template>
|
||||||
@@ -156,6 +156,7 @@
|
|||||||
operTimeStr: '',
|
operTimeStr: '',
|
||||||
prefixNo: 'QTCK',
|
prefixNo: 'QTCK',
|
||||||
fileList:[],
|
fileList:[],
|
||||||
|
rowCanEdit: true,
|
||||||
//出入库管理开关,适合独立仓管场景
|
//出入库管理开关,适合独立仓管场景
|
||||||
inOutManageFlag: false,
|
inOutManageFlag: false,
|
||||||
model: {},
|
model: {},
|
||||||
@@ -190,12 +191,15 @@
|
|||||||
{ title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.popupJsh, kind: 'batch', multi: false },
|
{ title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.popupJsh, kind: 'batch', multi: false },
|
||||||
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.input, readonly: true },
|
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
|
{ title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
|
||||||
|
{ title: '原数量', key: 'preNumber', width: '4%', type: FormTypes.normal },
|
||||||
|
{ title: '已入库', key: 'finishNumber', width: '4%', type: FormTypes.normal },
|
||||||
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber},
|
{ title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber},
|
||||||
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
|
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
|
||||||
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input }
|
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input },
|
||||||
|
{ title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
@@ -225,18 +229,25 @@
|
|||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
this.currentSelectDepotId = ''
|
this.currentSelectDepotId = ''
|
||||||
|
this.rowCanEdit = true
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0)
|
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0)
|
||||||
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
||||||
|
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
||||||
if (this.action === 'add') {
|
if (this.action === 'add') {
|
||||||
this.addInit(this.prefixNo)
|
this.addInit(this.prefixNo)
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
} else {
|
} else {
|
||||||
|
if(this.model.linkNumber) {
|
||||||
|
this.rowCanEdit = false
|
||||||
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
|
}
|
||||||
this.model.operTime = this.model.operTimeStr
|
this.model.operTime = this.model.operTimeStr
|
||||||
this.fileList = this.model.fileName
|
this.fileList = this.model.fileName
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'remark',
|
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
|
||||||
'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount'))
|
'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount'))
|
||||||
});
|
});
|
||||||
// 加载子表数据
|
// 加载子表数据
|
||||||
@@ -288,14 +299,13 @@
|
|||||||
this.$refs.waitBillList.show('出库', '销售,采购退货', "1,3")
|
this.$refs.waitBillList.show('出库', '销售,采购退货', "1,3")
|
||||||
this.$refs.waitBillList.title = "选择销售出库或采购退货"
|
this.$refs.waitBillList.title = "选择销售出库或采购退货"
|
||||||
},
|
},
|
||||||
waitBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, deposit, remark) {
|
waitBillListOk(selectBillDetailRows, linkNumber, remark) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
||||||
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
||||||
let listEx = []
|
let listEx = []
|
||||||
let allTaxLastMoney = 0
|
|
||||||
for(let j=0; j<selectBillDetailRows.length; j++) {
|
for(let j=0; j<selectBillDetailRows.length; j++) {
|
||||||
let info = selectBillDetailRows[j];
|
let info = selectBillDetailRows[j];
|
||||||
if(info.finishNumber>0) {
|
if(info.finishNumber>0) {
|
||||||
@@ -304,32 +314,13 @@
|
|||||||
info.unitPrice = 0
|
info.unitPrice = 0
|
||||||
info.allPrice = 0
|
info.allPrice = 0
|
||||||
info.linkId = info.id
|
info.linkId = info.id
|
||||||
allTaxLastMoney += info.taxLastMoney
|
|
||||||
listEx.push(info)
|
listEx.push(info)
|
||||||
this.changeColumnShow(info)
|
this.changeColumnShow(info)
|
||||||
}
|
}
|
||||||
this.materialTable.dataSource = listEx
|
this.materialTable.dataSource = listEx
|
||||||
///给优惠后金额重新赋值
|
|
||||||
allTaxLastMoney = allTaxLastMoney?allTaxLastMoney:0
|
|
||||||
let discount = 0
|
|
||||||
if(allTaxLastMoney!==0) {
|
|
||||||
discount = (discountMoney / allTaxLastMoney * 100).toFixed(2) - 0
|
|
||||||
}
|
|
||||||
let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0
|
|
||||||
let changeAmount = discountLastMoney
|
|
||||||
if(deposit) {
|
|
||||||
this.depositStatus = true
|
|
||||||
changeAmount = (discountLastMoney - deposit).toFixed(2)-0
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue({
|
this.form.setFieldsValue({
|
||||||
'organId': organId,
|
|
||||||
'linkNumber': linkNumber,
|
'linkNumber': linkNumber,
|
||||||
'discount': discount,
|
|
||||||
'discountMoney': discountMoney,
|
|
||||||
'discountLastMoney': discountLastMoney,
|
|
||||||
'deposit': deposit,
|
|
||||||
'changeAmount': changeAmount,
|
|
||||||
'remark': remark
|
'remark': remark
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
|
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
||||||
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
||||||
</a-row>
|
</a-row>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
|
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
||||||
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
||||||
</a-row>
|
</a-row>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
|
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
|
||||||
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
|
||||||
</a-row>
|
</a-row>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user