|
@@ -10,9 +10,25 @@
|
|
|
width="60%">
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<div class="common-main">
|
|
|
- <a-alert type="info" v-if="detail.length" style="margin-bottom:10px">
|
|
|
- <div slot="message">{{ customeName }},共 {{ detail && detail.length }} 个出库单,产品款数合计 <span>{{ productTotal&&productTotal.totalCategory }}</span> ,产品数量合计 <span>{{ productTotal&&productTotal.totalQty }}</span>。</div>
|
|
|
- </a-alert>
|
|
|
+ <div style="display:flex;margin-bottom:10px;align-items: center;">
|
|
|
+ <a-button type="primary" class="button-info" ghost v-if="isEdit">选择关联单据</a-button>
|
|
|
+ <div style="padding:0 15px;" v-if="sendBillStockOutList.length">
|
|
|
+ <div>{{ customeName }},共 {{ sendBillStockOutList && sendBillStockOutList.length }} 个出库单,产品款数合计 <span>{{ productTotal&&productTotal.totalCategory }}</span> ,产品数量合计 <span>{{ productTotal&&productTotal.totalQty }}</span>。</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="isEdit">
|
|
|
+ <a-table :columns="glColumns" :pagination="false" :scroll="{ y: 200 }" :data-source="sendBillStockOutList" bordered>
|
|
|
+ <template slot="action" slot-scope="text, record, index">
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-error"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
<div class="toolsBar">
|
|
|
<a-form-model
|
|
|
ref="ruleForm"
|
|
@@ -22,42 +38,42 @@
|
|
|
:wrapper-col="formItemLayout.wrapperCol"
|
|
|
>
|
|
|
<a-row>
|
|
|
- <a-col span="12">
|
|
|
+ <a-col span="8">
|
|
|
<a-form-model-item label="托运日期" prop="sendDate">
|
|
|
<a-date-picker :allowClear="false" inputReadOnly v-model="form.sendDate" :locale="locale"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col span="12">
|
|
|
- <a-form-model-item label="目的地">
|
|
|
- <a-input placeholder="请输入目的地(最多30字符)" :maxLength="30" v-model.trim="form.customerAddress"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col span="12">
|
|
|
+ <a-col span="8">
|
|
|
<a-form-model-item label="收货人" prop="customerCacateName">
|
|
|
<a-input placeholder="请输入收货人(最多30字符)" :maxLength="30" v-model.trim="form.customerCacateName"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col span="12">
|
|
|
+ <a-col span="8">
|
|
|
<a-form-model-item label="电话" prop="customerCacatePhone">
|
|
|
<a-input placeholder="请输入电话" :maxLength="30" v-model.trim="form.customerCacatePhone"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col span="24">
|
|
|
- <a-form-model-item label="详细地址" prop="customerAddressDetail" :label-col="{span:3}" :wrapper-col="{span:19}">
|
|
|
+ <a-form-model-item label="详细地址" prop="customerAddressDetail" :label-col="{span:2}" :wrapper-col="{span:21}">
|
|
|
<a-textarea placeholder="请输入详细地址(最多300字符)" :maxLength="300" v-model.trim="form.customerAddressDetail"></a-textarea>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col span="12">
|
|
|
+ <a-col span="8">
|
|
|
+ <a-form-model-item label="目的地">
|
|
|
+ <a-input placeholder="请输入目的地(最多30字符)" :maxLength="30" v-model.trim="form.customerAddress"></a-input>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col span="8">
|
|
|
<a-form-model-item label="物流电话" prop="transportTele">
|
|
|
<a-input placeholder="请输入物流电话" :maxLength="30" v-model.trim="form.transportTele"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col span="12">
|
|
|
+ <a-col span="8">
|
|
|
<a-form-model-item label="物流单号" prop="transportNo">
|
|
|
<a-input placeholder="请输入物流单号" :maxLength="30" v-model.trim="form.transportNo"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col span="12">
|
|
|
+ <a-col span="8">
|
|
|
<a-form-model-item label="付款方式">
|
|
|
<v-select
|
|
|
v-model="form.payType"
|
|
@@ -67,7 +83,7 @@
|
|
|
allowClear></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col span="12">
|
|
|
+ <a-col span="8">
|
|
|
<a-form-model-item label="交货方式">
|
|
|
<v-select
|
|
|
v-model="form.handoverType"
|
|
@@ -77,7 +93,7 @@
|
|
|
allowClear></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col span="12">
|
|
|
+ <a-col span="8">
|
|
|
<a-form-model-item label="运费合计">
|
|
|
<!-- <a-input disabled placeholder="请输入运费合计" v-model.trim="form.totalSendAmount"></a-input> -->
|
|
|
{{ form.totalSendAmount||'--' }}
|
|
@@ -170,8 +186,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="btn-box">
|
|
|
- <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
|
|
|
- <a-button type="primary" @click="handleCommonOk">{{ okText }}</a-button>
|
|
|
+ <a-button size="large" @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
|
|
|
+ <a-button size="large" type="primary" @click="handleCommonOk">{{ okText }}</a-button>
|
|
|
</div>
|
|
|
</a-spin>
|
|
|
</a-modal>
|
|
@@ -237,7 +253,21 @@ export default {
|
|
|
labelCol: { span: 6 },
|
|
|
wrapperCol: { span: 15 }
|
|
|
},
|
|
|
- detail: [],
|
|
|
+ sendBillStockOutList: [],
|
|
|
+ glColumns: [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '6%', align: 'center', customRender: function (text) { return text } },
|
|
|
+ { title: '出库单号', dataIndex: 'stockOutNo', width: '10%', align: 'center' },
|
|
|
+ { title: '业务单号', dataIndex: 'outBizSubNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '客户名称', dataIndex: 'buyerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '收货客户名称', dataIndex: 'receiverName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品款数', dataIndex: 'productTotalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '产品数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单据审核时间', dataIndex: 'settleTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '收款时间', dataIndex: 'settleTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
|
|
|
+ ],
|
|
|
productTotal: null,
|
|
|
tableData: [],
|
|
|
columns: [
|
|
@@ -261,7 +291,7 @@ export default {
|
|
|
methods: {
|
|
|
// 新增,出库单和收货人信息
|
|
|
setData (data, customeInfo) {
|
|
|
- this.detail = data
|
|
|
+ this.sendBillStockOutList = data
|
|
|
this.customeName = data[0].demanderName
|
|
|
this.isEdit = false
|
|
|
this.getProductTotal()
|
|
@@ -280,7 +310,7 @@ export default {
|
|
|
console.log(res)
|
|
|
this.spinning = false
|
|
|
if (res.data) {
|
|
|
- this.detail = res.data.sendBillStockOutList // 出库单
|
|
|
+ this.sendBillStockOutList = res.data.sendBillStockOutList // 出库单
|
|
|
this.tableData = res.data.detailList // 发货明细
|
|
|
this.tableData.map((item, i) => {
|
|
|
item.no = i + 1
|
|
@@ -310,7 +340,8 @@ export default {
|
|
|
totalQty: 0
|
|
|
}
|
|
|
const stockOutSnList = []
|
|
|
- this.detail.map(item => {
|
|
|
+ this.sendBillStockOutList.map((item, index) => {
|
|
|
+ item.no = index + 1
|
|
|
ret.totalCategory = ret.totalCategory + item.productTotalCategory
|
|
|
ret.totalQty = ret.totalQty + item.productTotalQty
|
|
|
stockOutSnList.push(item.stockOutSn)
|
|
@@ -410,7 +441,7 @@ export default {
|
|
|
handleCommonCancel () {
|
|
|
this.$emit('cancel')
|
|
|
this.tableData = []
|
|
|
- this.detail = []
|
|
|
+ this.sendBillStockOutList = []
|
|
|
this.spinning = false
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
this.form = {
|
|
@@ -448,6 +479,7 @@ export default {
|
|
|
.sendGood-detail-modal{
|
|
|
.common-main{
|
|
|
.toolsBar{
|
|
|
+ padding-top:15px;
|
|
|
border:1px solid #eee;
|
|
|
border-radius: 3px;
|
|
|
display: flex;
|