发货需求
This commit is contained in:
parent
a1298819d5
commit
a75b06fc74
@ -207,7 +207,7 @@
|
|||||||
dataIndex: 'kilometers'
|
dataIndex: 'kilometers'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:'车型',
|
title:'运输类型',
|
||||||
align:"center",
|
align:"center",
|
||||||
dataIndex: 'carType'
|
dataIndex: 'carType'
|
||||||
},
|
},
|
||||||
@ -254,16 +254,18 @@
|
|||||||
{
|
{
|
||||||
title:'生效日期',
|
title:'生效日期',
|
||||||
align:"center",
|
align:"center",
|
||||||
dataIndex: 'effectiveDate',
|
dataIndex: 'effectiveDate'
|
||||||
customRender:function (text) {
|
|
||||||
return !text?"":(text.length>10?text.substr(0,10):text)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:'时效',
|
title:'时效',
|
||||||
align:"center",
|
align:"center",
|
||||||
dataIndex: 'validity'
|
dataIndex: 'validity'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title:'失效日期',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'failureTime'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:'车型',
|
title:'运输类型',
|
||||||
align:"center",
|
align:"center",
|
||||||
dataIndex: 'carType'
|
dataIndex: 'carType'
|
||||||
},
|
},
|
||||||
|
@ -56,7 +56,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-model-item label="PO" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ffectivePo">
|
<a-form-model-item label="PO" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ffectivePo">
|
||||||
<a-input v-model="model.ffectivePo" placeholder="请输入PO" @keyup.enter.native="getByPo"></a-input>
|
<!-- <a-input v-model="model.ffectivePo" placeholder="请输入PO" @keyup.enter.native="getByPo"></a-input> -->
|
||||||
|
<a-select placeholder="请选择PO" v-model="model.ffectivePo" showSearch @change="getByPo">
|
||||||
|
<a-select-option v-for="item in ffectivePoList"
|
||||||
|
:key="item" :value="item" :label="item">
|
||||||
|
{{item}}</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="8">
|
<!-- <a-col :span="8">
|
||||||
@ -120,6 +125,7 @@
|
|||||||
model:{
|
model:{
|
||||||
},
|
},
|
||||||
poList: [],
|
poList: [],
|
||||||
|
ffectivePoList: [],
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 7 },
|
sm: { span: 7 },
|
||||||
@ -135,7 +141,9 @@
|
|||||||
add: "/deliveryplan/deliveryPlan/add",
|
add: "/deliveryplan/deliveryPlan/add",
|
||||||
edit: "/deliveryplan/deliveryPlan/edit",
|
edit: "/deliveryplan/deliveryPlan/edit",
|
||||||
queryById: "/deliveryplan/deliveryPlan/queryById",
|
queryById: "/deliveryplan/deliveryPlan/queryById",
|
||||||
getByPo: "/deliveryplan/deliveryPlan/getByPo"
|
getByPo: "/deliveryplan/deliveryPlan/getByPo",
|
||||||
|
getPo: "/deliveryplan/deliveryPlan/getPo",
|
||||||
|
getByDeliveryPlanId: "/deliveryplandetail/deliveryPlanDetail/getByDeliveryPlanId"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -151,6 +159,7 @@
|
|||||||
this.modelDefault.artName = userInfo.realname
|
this.modelDefault.artName = userInfo.realname
|
||||||
this.modelDefault.artTel = userInfo.phone
|
this.modelDefault.artTel = userInfo.phone
|
||||||
this.modelDefault.artEmail = userInfo.email
|
this.modelDefault.artEmail = userInfo.email
|
||||||
|
this.getPo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add () {
|
add () {
|
||||||
@ -159,7 +168,7 @@
|
|||||||
edit (record) {
|
edit (record) {
|
||||||
this.model = Object.assign({}, record);
|
this.model = Object.assign({}, record);
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.getByPo();
|
this.getByDeliveryPlanId();
|
||||||
},
|
},
|
||||||
submitForm () {
|
submitForm () {
|
||||||
const that = this;
|
const that = this;
|
||||||
@ -197,6 +206,23 @@
|
|||||||
this.poList = res.result;
|
this.poList = res.result;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getPo(){
|
||||||
|
getAction(this.url.getPo).then(res => {
|
||||||
|
if(res.success){
|
||||||
|
this.ffectivePoList = res.result;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getByDeliveryPlanId(){
|
||||||
|
if(!this.model.id){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
getAction(this.url.getByDeliveryPlanId,{id: this.model.id}).then(res => {
|
||||||
|
if(res.success){
|
||||||
|
this.poList = res.result;
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,26 +167,26 @@
|
|||||||
align:"center",
|
align:"center",
|
||||||
dataIndex: 'shipType_dictText'
|
dataIndex: 'shipType_dictText'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title:'料号',
|
// title:'料号',
|
||||||
align:"center",
|
// align:"center",
|
||||||
dataIndex: 'pn'
|
// dataIndex: 'pn'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title:'规格',
|
// title:'规格',
|
||||||
align:"center",
|
// align:"center",
|
||||||
dataIndex: 'spec'
|
// dataIndex: 'spec'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title:'发货数量',
|
title:'发货数量',
|
||||||
align:"center",
|
align:"center",
|
||||||
dataIndex: 'shipNumber'
|
dataIndex: 'shipNumber'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title:'单位',
|
// title:'单位',
|
||||||
align:"center",
|
// align:"center",
|
||||||
dataIndex: 'unit_dictText'
|
// dataIndex: 'unit_dictText'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title:'预估托盘数',
|
title:'预估托盘数',
|
||||||
align:"center",
|
align:"center",
|
||||||
@ -197,6 +197,11 @@
|
|||||||
align:"center",
|
align:"center",
|
||||||
dataIndex: 'shipDate'
|
dataIndex: 'shipDate'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title:'到货日期',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'deliveryDate'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title:'送货地点',
|
title:'送货地点',
|
||||||
align:"center",
|
align:"center",
|
||||||
@ -207,16 +212,16 @@
|
|||||||
align:"center",
|
align:"center",
|
||||||
dataIndex: 'pickUpHub'
|
dataIndex: 'pickUpHub'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title:'发货单',
|
// title:'发货单',
|
||||||
align:"center",
|
// align:"center",
|
||||||
dataIndex: 'invoice'
|
// dataIndex: 'invoice'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title:'销售人员',
|
// title:'销售人员',
|
||||||
align:"center",
|
// align:"center",
|
||||||
dataIndex: 'salesperson'
|
// dataIndex: 'salesperson'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title:'作业备注',
|
title:'作业备注',
|
||||||
align:"center",
|
align:"center",
|
||||||
|
@ -4,13 +4,12 @@
|
|||||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-model-item label="发货类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shipType">
|
<a-form-model-item label="运输类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shipType">
|
||||||
<j-dict-select-tag v-model="model.shipType" dictCode="ship_type" placeholder="请选择发货类型" />
|
<j-dict-select-tag v-model="model.shipType" dictCode="ship_type" placeholder="请选择运输类型" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<!-- <a-col :span="8">
|
||||||
<a-form-model-item label="料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pn">
|
<a-form-model-item label="料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pn">
|
||||||
<!-- <a-input v-model.trim="model.pn" placeholder="请输入料号" @change="changeGetpalletsNum" ></a-input> -->
|
|
||||||
<a-auto-complete v-model="model.pn" placeholder="请输入料号" @select="pnSelect" @change="pnChange" :dataSource="pnList"></a-auto-complete>
|
<a-auto-complete v-model="model.pn" placeholder="请输入料号" @select="pnSelect" @change="pnChange" :dataSource="pnList"></a-auto-complete>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -18,10 +17,10 @@
|
|||||||
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
|
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
|
||||||
<a-input v-model="model.spec" placeholder="请输入规格" disabled ></a-input>
|
<a-input v-model="model.spec" placeholder="请输入规格" disabled ></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col> -->
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-model-item label="发货数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shipNumber">
|
<a-form-model-item label="发货数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shipNumber">
|
||||||
<a-input-number v-model="model.shipNumber" :min="0" placeholder="请输入发货数量" style="width: 100%" @change="changeGetpalletsNum"/>
|
<a-input-number v-model="model.shipNumber" :min="0" placeholder="请输入发货数量" style="width: 100%"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -29,20 +28,20 @@
|
|||||||
<a-input-number v-model="model.palletsNum" placeholder="请输入预估托盘数" style="width: 100%" />
|
<a-input-number v-model="model.palletsNum" placeholder="请输入预估托盘数" style="width: 100%" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<!-- <a-col :span="8">
|
||||||
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
|
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
|
||||||
<j-dict-select-tag placeholder="请选择单位" v-model="model.unit" dictCode="unit"></j-dict-select-tag>
|
<j-dict-select-tag placeholder="请选择单位" v-model="model.unit" dictCode="unit"></j-dict-select-tag>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col> -->
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-model-item label="发货日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shipDate">
|
<a-form-model-item label="发货日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shipDate">
|
||||||
<j-date placeholder="请选择发货日期" v-model="model.shipDate" style="width: 100%" />
|
<j-date placeholder="请选择发货日期" v-model="model.shipDate" style="width: 100%" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-model-item label="取货仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pickUpHub">
|
<a-form-model-item label="取货地点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pickUpHub">
|
||||||
<!-- <j-dict-select-tag placeholder="请选择取货仓库" v-model="model.pickUpHub" dictCode="tms_logistics_route,start_city,start_city"></j-dict-select-tag> -->
|
<!-- <j-dict-select-tag placeholder="请选择取货仓库" v-model="model.pickUpHub" dictCode="tms_logistics_route,start_city,start_city"></j-dict-select-tag> -->
|
||||||
<a-auto-complete v-model="model.pickUpHub" placeholder="请输入取货仓库" @select="pickUpHubSelect" @change="pickUpHubChange" :dataSource="pickUpHubList"></a-auto-complete>
|
<a-auto-complete v-model="model.pickUpHub" placeholder="请输入取货地点" @select="pickUpHubSelect" @change="pickUpHubChange" :dataSource="pickUpHubList"></a-auto-complete>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -51,35 +50,69 @@
|
|||||||
<a-input v-model="model.deliveryAddress" placeholder="请输入送货地点" disabled ></a-input>
|
<a-input v-model="model.deliveryAddress" placeholder="请输入送货地点" disabled ></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-model-item label="到货日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryDate">
|
||||||
|
<j-date placeholder="请选择到货日期" v-model="model.deliveryDate" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<!--
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-model-item label="销售人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="salesperson">
|
||||||
|
<a-input v-model="model.salesperson" placeholder="请输入销售人员" ></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col> -->
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-model-item label="作业备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNotes">
|
||||||
|
<a-input v-model="model.workNotes" placeholder="请输入作业备注" ></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8" v-if="model.id">
|
||||||
|
<a-form-model-item label="当前状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentStatus">
|
||||||
|
<j-dict-select-tag placeholder="请选择当前状态" v-model="model.currentStatus" dictCode="current_status" disabled></j-dict-select-tag>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-model-item label="发货单" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invoice">
|
<a-form-model-item label="发货单" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invoice">
|
||||||
<!-- <a-input v-model="model.invoice" placeholder="请输入发货单" ></a-input> -->
|
<a-select placeholder="发货单" v-model="model.invoice" showSearch @change="changeInvoice">
|
||||||
<a-select placeholder="发货单" v-model="model.invoice" showSearch>
|
|
||||||
<a-select-option v-for="item in invoiceList"
|
<a-select-option v-for="item in invoiceList"
|
||||||
:key="item" :value="item" :label="item">
|
:key="item" :value="item" :label="item">
|
||||||
{{item}}</a-select-option>
|
{{item}}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
|
||||||
<a-form-model-item label="销售人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="salesperson">
|
|
||||||
<a-input v-model="model.salesperson" placeholder="请输入销售人员" ></a-input>
|
|
||||||
</a-form-model-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="8">
|
|
||||||
<a-form-model-item label="作业备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNotes">
|
|
||||||
<a-input v-model="model.workNotes" placeholder="请输入作业备注" ></a-input>
|
|
||||||
</a-form-model-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="8">
|
|
||||||
<a-form-model-item label="当前状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentStatus">
|
|
||||||
<j-dict-select-tag placeholder="请选择当前状态" v-model="model.currentStatus" dictCode="current_status" disabled></j-dict-select-tag>
|
|
||||||
</a-form-model-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</j-form-container>
|
</j-form-container>
|
||||||
|
<table style="width: 100%;">
|
||||||
|
<thead>
|
||||||
|
<tr align="center">
|
||||||
|
<th style="width: 5%;"></th>
|
||||||
|
<th style="width: 15%;">发货单</th>
|
||||||
|
<th style="width: 15%;">发货仓库</th>
|
||||||
|
<th style="width: 15%;">料号</th>
|
||||||
|
<th style="width: 15%;">品名</th>
|
||||||
|
<th style="width: 15%;">规格</th>
|
||||||
|
<th style="width: 10%;">数量</th>
|
||||||
|
<th style="width: 5%;">单位</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(item,index) in deliveryDetailList" align="center" :key="index">
|
||||||
|
<a-checkbox v-model="item.selected"></a-checkbox>
|
||||||
|
<td style="width: 15%;">{{ item.invoice }}</td>
|
||||||
|
<td style="width: 15%;">{{ item.pickUpHub }}</td>
|
||||||
|
<td style="width: 15%;">{{ item.pn }}</td>
|
||||||
|
<td style="width: 15%;">{{ item.productName }}</td>
|
||||||
|
<td style="width: 15%;">{{ item.specName }}</td>
|
||||||
|
<td style="width: 10%;"><a-input-number v-model="item.shipNumber" :min="0" style="width: 100%;" @change="changeQty"/></td>
|
||||||
|
<td style="width: 5%;">{{ item.unit }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div align="center" style="margin-top: 20px;">
|
||||||
|
<!-- <a-button @click="addLine" type="primary">新增</a-button> -->
|
||||||
|
<a-button @click="batchDel" type="danger">删除选中</a-button>
|
||||||
|
</div>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -88,6 +121,7 @@
|
|||||||
import { httpAction, getAction,postAction } from '@/api/manage'
|
import { httpAction, getAction,postAction } from '@/api/manage'
|
||||||
import { validateDuplicateValue } from '@/utils/util'
|
import { validateDuplicateValue } from '@/utils/util'
|
||||||
import { off } from 'codemirror'
|
import { off } from 'codemirror'
|
||||||
|
import { h } from 'vue'
|
||||||
import { min } from 'xe-utils/methods'
|
import { min } from 'xe-utils/methods'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -109,7 +143,10 @@ import { min } from 'xe-utils/methods'
|
|||||||
pnSpecList:[],
|
pnSpecList:[],
|
||||||
pnList:[],
|
pnList:[],
|
||||||
invoiceList:[],
|
invoiceList:[],
|
||||||
|
deliveryDetailList:[],
|
||||||
model:{
|
model:{
|
||||||
|
shipNumber: 0,
|
||||||
|
palletsNum: 0
|
||||||
},
|
},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@ -125,6 +162,7 @@ import { min } from 'xe-utils/methods'
|
|||||||
pn :[{required: true, message: '请输入料号!'}],
|
pn :[{required: true, message: '请输入料号!'}],
|
||||||
shipNumber :[{required: true, message: '请输入发货数量!'}],
|
shipNumber :[{required: true, message: '请输入发货数量!'}],
|
||||||
shipDate :[{required: true, message: '请选择发货日期!'}],
|
shipDate :[{required: true, message: '请选择发货日期!'}],
|
||||||
|
deliveryDate :[{required: true, message: '请选择到货日期!'}],
|
||||||
deliveryAddress :[{required: true, message: '请选择送货地点!'}],
|
deliveryAddress :[{required: true, message: '请选择送货地点!'}],
|
||||||
pickUpHub :[{required: true, message: '请选择取货仓库!'}],
|
pickUpHub :[{required: true, message: '请选择取货仓库!'}],
|
||||||
spec: [{required: true, message: '请输入规格!'}],
|
spec: [{required: true, message: '请输入规格!'}],
|
||||||
@ -137,7 +175,9 @@ import { min } from 'xe-utils/methods'
|
|||||||
getPalletsNum: "/deliverydemand/deliveryDemand/getPalletsNum",
|
getPalletsNum: "/deliverydemand/deliveryDemand/getPalletsNum",
|
||||||
getCity: "/logisticsroute/logisticsRoute/getCity",
|
getCity: "/logisticsroute/logisticsRoute/getCity",
|
||||||
getPnSpecList: "/vehicleproduct/tmsVehicleProduct/getPnSpecList",
|
getPnSpecList: "/vehicleproduct/tmsVehicleProduct/getPnSpecList",
|
||||||
getShip: "/deliverydemand/deliveryDemand/getShip"
|
getShip: "/deliverydemand/deliveryDemand/getShip",
|
||||||
|
getShipDetail: "/deliverydemand/deliveryDemand/getShipDetail",
|
||||||
|
queryByDeliveryDemandId: "/deliverydemanddetail/deliveryDemandDetail/queryByDeliveryDemandId"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -154,12 +194,12 @@ import { min } from 'xe-utils/methods'
|
|||||||
this.getShip();
|
this.getShip();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 计算托盘数
|
||||||
changeGetpalletsNum() {
|
changeGetpalletsNum() {
|
||||||
if (!this.model.pn || !this.model.spec || !this.model.shipNumber) {
|
// if (!this.model.pn || !this.model.spec || !this.model.shipNumber) {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
console.log("22222");
|
postAction(this.url.getPalletsNum, this.deliveryDetailList).then(res => {
|
||||||
postAction(this.url.getPalletsNum, this.model).then(res => {
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.model.palletsNum = res.result
|
this.model.palletsNum = res.result
|
||||||
}
|
}
|
||||||
@ -171,6 +211,7 @@ import { min } from 'xe-utils/methods'
|
|||||||
edit (record) {
|
edit (record) {
|
||||||
this.model = Object.assign({}, record);
|
this.model = Object.assign({}, record);
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this.queryByDeliveryDemandId();
|
||||||
},
|
},
|
||||||
submitForm () {
|
submitForm () {
|
||||||
const that = this;
|
const that = this;
|
||||||
@ -187,6 +228,7 @@ import { min } from 'xe-utils/methods'
|
|||||||
httpurl+=this.url.edit;
|
httpurl+=this.url.edit;
|
||||||
method = 'put';
|
method = 'put';
|
||||||
}
|
}
|
||||||
|
this.model.deliveryDemandDetailList = this.deliveryDetailList
|
||||||
httpAction(httpurl,this.model,method).then((res)=>{
|
httpAction(httpurl,this.model,method).then((res)=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
that.$message.success(res.message);
|
that.$message.success(res.message);
|
||||||
@ -243,7 +285,46 @@ import { min } from 'xe-utils/methods'
|
|||||||
this.invoiceList = res.result
|
this.invoiceList = res.result
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
addLine(){
|
||||||
|
this.deliveryDetailList.push({selected: false,shipNumber: 0})
|
||||||
|
},
|
||||||
|
batchDel(){
|
||||||
|
this.deliveryDetailList = this.deliveryDetailList.filter(x => x.selected===false)
|
||||||
|
this.changeQty()
|
||||||
|
},
|
||||||
|
// 计算发货数量
|
||||||
|
changeQty(){
|
||||||
|
this.model.shipNumber = parseFloat(this.deliveryDetailList.reduce((sum, current) => sum + current.shipNumber, 0).toFixed(4));
|
||||||
|
console.log(this.model.shipNumber);
|
||||||
|
console.log(typeof this.model.shipNumber);
|
||||||
|
|
||||||
|
this.changeGetpalletsNum()
|
||||||
|
},
|
||||||
|
changeInvoice(value){
|
||||||
|
console.log(value);
|
||||||
|
let hasEven = this.deliveryDetailList.some((item) => {
|
||||||
|
return item.invoice == value;
|
||||||
|
});
|
||||||
|
if(hasEven){
|
||||||
|
this.$message.warning("列表中已存在"+value);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
getAction(this.url.getShipDetail, {invoice: value}).then(res => {
|
||||||
|
if(res.success){
|
||||||
|
this.deliveryDetailList.push(...res.result)
|
||||||
|
this.changeQty()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queryByDeliveryDemandId(){
|
||||||
|
getAction(this.url.queryByDeliveryDemandId, {deliveryDemandId: this.model.id}).then(res => {
|
||||||
|
if(res.success){
|
||||||
|
this.deliveryDetailList = res.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user