|
@@ -1,27 +1,20 @@
|
|
|
|
+//新增运输预约
|
|
<template>
|
|
<template>
|
|
<!-- 新增运输作业页面 -->
|
|
<!-- 新增运输作业页面 -->
|
|
<div id="contractDetails">
|
|
<div id="contractDetails">
|
|
<page-title>运输预约</page-title>
|
|
<page-title>运输预约</page-title>
|
|
-
|
|
|
|
<div class="main">
|
|
<div class="main">
|
|
<el-divider content-position="left">新增运输预约</el-divider>
|
|
<el-divider content-position="left">新增运输预约</el-divider>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <div class="material from">
|
|
|
|
- <span class="text">物资:</span>
|
|
|
|
- <el-input v-model="materialName" disabled> </el-input>
|
|
|
|
- <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
<div class="forwardingUnit from">
|
|
<div class="forwardingUnit from">
|
|
<span class="text">发货单位:</span>
|
|
<span class="text">发货单位:</span>
|
|
<el-input v-model="supplierName" disabled> </el-input>
|
|
<el-input v-model="supplierName" disabled> </el-input>
|
|
<el-button type="primary" @click="ondrawer(2)">浏览</el-button>
|
|
<el-button type="primary" @click="ondrawer(2)">浏览</el-button>
|
|
</div>
|
|
</div>
|
|
- <div class="remark from">
|
|
|
|
- <span class="text">船名:</span>
|
|
|
|
- <el-input v-model="remark" @blur="onBlur"> </el-input>
|
|
|
|
- <span class="span"></span>
|
|
|
|
|
|
+ <div class="forwardingUnit from">
|
|
|
|
+ <span class="text">收货单位:</span>
|
|
|
|
+ <el-input v-model="receiveName" disabled> </el-input>
|
|
|
|
+ <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="forwardingUnit from">
|
|
<div class="forwardingUnit from">
|
|
<span class="text">卸货点:</span>
|
|
<span class="text">卸货点:</span>
|
|
@@ -33,19 +26,33 @@
|
|
<el-input v-model="lineName" disabled> </el-input>
|
|
<el-input v-model="lineName" disabled> </el-input>
|
|
<el-button type="primary" @click="ondrawer(5)">浏览</el-button>
|
|
<el-button type="primary" @click="ondrawer(5)">浏览</el-button>
|
|
</div>
|
|
</div>
|
|
- <div class="contractTitle from">
|
|
|
|
- <dil-form :formId="219" v-model="form1"></dil-form>
|
|
|
|
|
|
+ <div class="truckList1">
|
|
|
|
+ <div class="truckList from">
|
|
|
|
+ <span class="text">选择承运商:</span>
|
|
|
|
+ <el-autocomplete
|
|
|
|
+ class="inline-input"
|
|
|
|
+ v-model="state2"
|
|
|
|
+ :fetch-suggestions="querySearch"
|
|
|
|
+ placeholder="请输入承运商名称"
|
|
|
|
+ :trigger-on-focus="false"
|
|
|
|
+ @select="handleSelect"
|
|
|
|
+ @input="oninput"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="{ item }">
|
|
|
|
+ <div class="name">{{ item.value }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-autocomplete>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="truckList1">
|
|
<div class="truckList1">
|
|
<div class="truckList from">
|
|
<div class="truckList from">
|
|
- <span class="text">选择车辆:</span>
|
|
|
|
- <el-button type="primary" @click="ondrawer(3)" class="truckBtn"
|
|
|
|
|
|
+ <span class="text">选择物资:</span>
|
|
|
|
+ <el-button type="primary" @click=" table = true" class="truckBtn"
|
|
>浏览</el-button
|
|
>浏览</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- 车辆表格 -->
|
|
|
|
- <div class="switch" v-if="selectionList.length > 0">
|
|
|
|
|
|
+ <div class="switch" v-if="tableData.length > 0">
|
|
<el-tooltip placement="top">
|
|
<el-tooltip placement="top">
|
|
<div slot="content">下面表格已有数据,不能进行更改!!!</div>
|
|
<div slot="content">下面表格已有数据,不能进行更改!!!</div>
|
|
<el-switch
|
|
<el-switch
|
|
@@ -64,15 +71,15 @@
|
|
</el-switch>
|
|
</el-switch>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 物资表格 -->
|
|
<div class="truckListTable">
|
|
<div class="truckListTable">
|
|
|
|
+ <div class="selectionTable">
|
|
<el-table
|
|
<el-table
|
|
- :data="selectionList"
|
|
|
|
|
|
+ :data="tableData"
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
highlight-current-row
|
|
highlight-current-row
|
|
>
|
|
>
|
|
- <el-table-column type="index" width="50" label="序号" align="center">
|
|
|
|
- </el-table-column>
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
v-for="(item, i) in tableTop"
|
|
v-for="(item, i) in tableTop"
|
|
:key="i"
|
|
:key="i"
|
|
@@ -81,21 +88,21 @@
|
|
align="center"
|
|
align="center"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
>
|
|
>
|
|
- <template slot="scope" v-if="item.th_name !== '件数'">
|
|
|
|
- <span>{{ item.label }}</span>
|
|
|
|
- </template>
|
|
|
|
- <template slot="scope" v-if="item.th_name !== '重量'">
|
|
|
|
|
|
+ <template slot="scope" v-if="item.label !== '件数'">
|
|
<span>{{ item.label }}</span>
|
|
<span>{{ item.label }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 插入输入框 -->
|
|
<!-- 插入输入框 -->
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<template v-if="item.slot">
|
|
<template v-if="item.slot">
|
|
|
|
+ <!-- 物资件数 -->
|
|
<template v-if="item.prop == 'orderMaterialNumber'">
|
|
<template v-if="item.prop == 'orderMaterialNumber'">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ class="textinput"
|
|
v-model.number="scope.row.orderMaterialNumber"
|
|
v-model.number="scope.row.orderMaterialNumber"
|
|
></el-input>
|
|
></el-input>
|
|
</template>
|
|
</template>
|
|
- <template v-if="item.prop == 'orderMaterialWeight'">
|
|
|
|
|
|
+ <!-- 物资重量 -->
|
|
|
|
+ <template v-if="item.prop == 'orderMaterialWeight'">
|
|
<el-input
|
|
<el-input
|
|
v-model.number="scope.row.orderMaterialWeight"
|
|
v-model.number="scope.row.orderMaterialWeight"
|
|
></el-input>
|
|
></el-input>
|
|
@@ -106,16 +113,40 @@
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
-
|
|
|
|
|
|
+ <!-- 操作列 -->
|
|
<el-table-column fixed="right" label="操作" width="100">
|
|
<el-table-column fixed="right" label="操作" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" size="small" @click="onClick(scope.$index)"
|
|
|
|
- >删除</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ @click.native.prevent="deleteRow(scope.$index, tableData)"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-close"
|
|
|
|
+ size="big"
|
|
|
|
+ ></el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 物资模态框 -->
|
|
|
|
+ <el-drawer
|
|
|
|
+ title="选择物资信息"
|
|
|
|
+ :visible.sync="table"
|
|
|
|
+ direction="rtl"
|
|
|
|
+ size="35%"
|
|
|
|
+ :show-close="false"
|
|
|
|
+ >
|
|
|
|
+ <el-input placeholder="请输入内容" v-model="input" clearable> </el-input
|
|
|
|
+ ><el-button type="primary" class="btn" @click="onclick">
|
|
|
|
+ <i class="el-icon-search"></i>查询
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button @click="open">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="makeSure1">确定</el-button>
|
|
|
|
+ <div class="tablecls">
|
|
|
|
+ <!-- 查询所有的物资 -->
|
|
|
|
+ <dilTable v-bind.sync="materialOptions" @selection-change="selectionChange">
|
|
|
|
+ </dilTable>
|
|
|
|
+ </div>
|
|
|
|
+ </el-drawer>
|
|
<!-- 模态窗口 -->
|
|
<!-- 模态窗口 -->
|
|
<el-drawer :visible.sync="drawer" :direction="direction" size="30%">
|
|
<el-drawer :visible.sync="drawer" :direction="direction" size="30%">
|
|
<el-input
|
|
<el-input
|
|
@@ -132,9 +163,9 @@
|
|
>
|
|
>
|
|
<i class="el-icon-search"></i>查询
|
|
<i class="el-icon-search"></i>查询
|
|
</el-button>
|
|
</el-button>
|
|
- <div v-show="a == 1">
|
|
|
|
|
|
+ <div v-show="a == 1">
|
|
<dilTable
|
|
<dilTable
|
|
- v-bind.sync="frist"
|
|
|
|
|
|
+ v-bind.sync="receiveOptions"
|
|
@radio-change="currentRadioChange1"
|
|
@radio-change="currentRadioChange1"
|
|
></dilTable>
|
|
></dilTable>
|
|
</div>
|
|
</div>
|
|
@@ -165,7 +196,7 @@
|
|
</el-drawer>
|
|
</el-drawer>
|
|
<div class="button_box">
|
|
<div class="button_box">
|
|
<el-button @click="onClickCancel">返回</el-button>
|
|
<el-button @click="onClickCancel">返回</el-button>
|
|
- <el-button type="primary" @click="onClickConfirm">确认</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="makeSure">确认</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -175,24 +206,33 @@ export default {
|
|
components: { PageTitle },
|
|
components: { PageTitle },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ receiveName:'',
|
|
|
|
+ state2:null,
|
|
|
|
+ restaurants: [],
|
|
|
|
+ orderType:12,
|
|
// 线路名称
|
|
// 线路名称
|
|
lineName: "",
|
|
lineName: "",
|
|
//线路id
|
|
//线路id
|
|
lineId: null,
|
|
lineId: null,
|
|
// 件数与重量的开关
|
|
// 件数与重量的开关
|
|
value: false,
|
|
value: false,
|
|
- //船名
|
|
|
|
- remark: null,
|
|
|
|
- // 车辆表格表头
|
|
|
|
|
|
+ // 物资模态框开关
|
|
|
|
+ table: false,
|
|
|
|
+ // 物资表格表头
|
|
tableTop: [
|
|
tableTop: [
|
|
{
|
|
{
|
|
- prop: "capacityNumber",
|
|
|
|
- label: "车牌号",
|
|
|
|
|
|
+ prop: "materialCode",
|
|
|
|
+ label: "物资编码",
|
|
|
|
+ width: "160",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: "materialName",
|
|
|
|
+ label: "物资名称",
|
|
width: "140",
|
|
width: "140",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: "carrierName",
|
|
|
|
- label: "承运商",
|
|
|
|
|
|
+ prop: "Specification",
|
|
|
|
+ label: "规格型号",
|
|
width: "140",
|
|
width: "140",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -201,12 +241,13 @@ export default {
|
|
slot: true,
|
|
slot: true,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- //车辆表格数据
|
|
|
|
- selectionList: [],
|
|
|
|
- // 表单
|
|
|
|
- form1: {},
|
|
|
|
- //采购订单id
|
|
|
|
- purchaseOrderId: "",
|
|
|
|
|
|
+ // 收货单位ID
|
|
|
|
+ receiveId:null,
|
|
|
|
+ //承运商ID
|
|
|
|
+ carrierId:null,
|
|
|
|
+ //物资表格数据
|
|
|
|
+ tableData: [],
|
|
|
|
+ selectionList1: [],
|
|
//物资名称
|
|
//物资名称
|
|
materialName: "",
|
|
materialName: "",
|
|
//发货单位名称
|
|
//发货单位名称
|
|
@@ -224,30 +265,39 @@ export default {
|
|
a: 1,
|
|
a: 1,
|
|
direction: "rtl",
|
|
direction: "rtl",
|
|
input: "",
|
|
input: "",
|
|
- frist: {
|
|
|
|
- requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
|
|
|
|
- selectionType: "radio",
|
|
|
|
- mapList1: [],
|
|
|
|
|
|
+ //物资模态框
|
|
|
|
+ materialOptions:{
|
|
|
|
+ requestUrl:
|
|
|
|
+ "/api/v1/uc/queryMaterialByLike?apiId=395&startNum=" + '0801',
|
|
|
|
+ selectionType: "select",
|
|
},
|
|
},
|
|
secend: {
|
|
secend: {
|
|
requestUrl:
|
|
requestUrl:
|
|
- "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=",
|
|
|
|
|
|
+ "/api/v1/uc/querySupplierByLike?apiId=247",
|
|
selectionType: "radio",
|
|
selectionType: "radio",
|
|
mapList2: [],
|
|
mapList2: [],
|
|
},
|
|
},
|
|
- third: {
|
|
|
|
- requestUrl: "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248",
|
|
|
|
- selectionType: "select",
|
|
|
|
- mapList3: [],
|
|
|
|
|
|
+ receiveOptions:{
|
|
|
|
+ requestUrl:
|
|
|
|
+ "/api/v1/uc/queryConsigneeByLike?apiId=396",
|
|
|
|
+ selectionType:"radio",
|
|
|
|
+ },
|
|
|
|
+ third:{
|
|
|
|
+ requestUrl:
|
|
|
|
+ "/api/v1/uc/getCarrierMesByLike?apiId=244",
|
|
|
|
+ selectionType:"radio",
|
|
|
|
+ carriermapList:[]
|
|
},
|
|
},
|
|
unloadPoint: {
|
|
unloadPoint: {
|
|
requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
|
|
requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
|
|
selectionType: "radio",
|
|
selectionType: "radio",
|
|
|
|
+ unloadMapList:[]
|
|
},
|
|
},
|
|
line: {
|
|
line: {
|
|
requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
|
|
requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
|
|
selectionType: "radio",
|
|
selectionType: "radio",
|
|
},
|
|
},
|
|
|
|
+ row: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -270,42 +320,76 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- onClick(index) {
|
|
|
|
- this.selectionList.splice(index, 1);
|
|
|
|
|
|
+ handleSelect(item){
|
|
|
|
+ this.carrierId = item.carrierId
|
|
|
|
+ item.carrierName = this.state2
|
|
},
|
|
},
|
|
- onBlur() {
|
|
|
|
- this.getPurchaseOrderNo();
|
|
|
|
|
|
+ oninput(){
|
|
|
|
+ this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+this.state2).then((res)=>{
|
|
|
|
+ if(res.data.code == "200"){
|
|
|
|
+ this.restaurants = res.data.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- getPurchaseOrderNo() {
|
|
|
|
- let map = {
|
|
|
|
- materialId: this.materialId,
|
|
|
|
- supplierId: this.supplierId,
|
|
|
|
- };
|
|
|
|
- if (this.remark) {
|
|
|
|
- map.remark = this.remark;
|
|
|
|
- }
|
|
|
|
- console.log(this.map);
|
|
|
|
- if (this.materialId && this.supplierId) {
|
|
|
|
- this.$axios.post("/api/v1/oms/selectNewOrderId", map).then((res) => {
|
|
|
|
- console.log(res);
|
|
|
|
- if (res.data.code == "200") {
|
|
|
|
- if (res.data.data == null) {
|
|
|
|
- this.$message({
|
|
|
|
- message: "没有匹配的采购订单号!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- this.form1 = [];
|
|
|
|
- } else {
|
|
|
|
- this.remark = res.data.data.remark;
|
|
|
|
- this.purchaseOrderId = res.data.data.purchaseOrderId;
|
|
|
|
- this.form1 = { purchaseOrderNo: res.data.data.purchaseOrderNo };
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.$message.error("请求失败");
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ //搜索
|
|
|
|
+ querySearch(queryString, cb) {
|
|
|
|
+ var restaurants = this.restaurants;
|
|
|
|
+ console.log(this.restaurants,"this.restaurants");
|
|
|
|
+ var results = queryString ? restaurants.filter(this.createFilter(queryString)) :restaurants;
|
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
|
+ console.log(results,"results");
|
|
|
|
+ cb(results);
|
|
|
|
+ },
|
|
|
|
+ createFilter(queryString) {
|
|
|
|
+ return (restaurants) => {
|
|
|
|
+ return (restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ //删除行
|
|
|
|
+ deleteRow(index, rows) {
|
|
|
|
+ rows.splice(index, 1);
|
|
|
|
+ },
|
|
|
|
+ // 返回主界面
|
|
|
|
+ makeSure1() {
|
|
|
|
+ console.log(this.selectionList1)
|
|
|
|
+ this.selectionList1.forEach((e) => {
|
|
|
|
+ var addmap = {
|
|
|
|
+ materialCode: e.materialCode,
|
|
|
|
+ materialName: e.materialName,
|
|
|
|
+ Specification: e.materialSpecification+e.materialModel,
|
|
|
|
+ orderMaterialWeight: null,
|
|
|
|
+ materialId: e.materialId,
|
|
|
|
+ };
|
|
|
|
+ this.tableData.push(addmap);
|
|
|
|
+ this.selectionList1 = [];
|
|
|
|
+ this.table = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //取消模态框多选
|
|
|
|
+ open() {
|
|
|
|
+ if (this.selectionList1.length != 0) {
|
|
|
|
+ this.$confirm("取消会将已选择的数据清空, 是否继续?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.selectionList1 = [];
|
|
|
|
+ this.table = false;
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
|
|
+ } else {
|
|
|
|
+ this.table = false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ onClick(index) {
|
|
|
|
+ this.tableData.splice(index, 1);
|
|
|
|
+ },
|
|
|
|
+ // 返回选中的物资信息
|
|
|
|
+ selectionChange(selection) {
|
|
|
|
+ this.selectionList1 = [];
|
|
|
|
+ this.selectionList1 = selection;
|
|
|
|
+ },
|
|
onclick(a) {
|
|
onclick(a) {
|
|
if (a == 1) {
|
|
if (a == 1) {
|
|
this.frist.requestUrl =
|
|
this.frist.requestUrl =
|
|
@@ -332,26 +416,19 @@ export default {
|
|
ondrawer(num) {
|
|
ondrawer(num) {
|
|
this.drawer = true;
|
|
this.drawer = true;
|
|
this.a = num;
|
|
this.a = num;
|
|
- if (num == 2) {
|
|
|
|
- this.secend.requestUrl =
|
|
|
|
- "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
|
|
|
|
- this.materialId;
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
// 返回
|
|
// 返回
|
|
onClickCancel() {
|
|
onClickCancel() {
|
|
- this.$router.push("/importedIngredients/transportReserveFu");
|
|
|
|
|
|
+ this.$router.push("/importedFuel/transportReserveRan");
|
|
},
|
|
},
|
|
currentRadioChange1(selection) {
|
|
currentRadioChange1(selection) {
|
|
- this.input = null;
|
|
|
|
- this.materialName = selection.materialName;
|
|
|
|
- this.materialId = selection.materialId;
|
|
|
|
- this.getPurchaseOrderNo();
|
|
|
|
|
|
+ console.log(selection);
|
|
|
|
+ this.receiveName = selection.consigneeCompanyName;
|
|
|
|
+ this.receiveId = selection.consigneeId;
|
|
},
|
|
},
|
|
currentRadioChange2(selection) {
|
|
currentRadioChange2(selection) {
|
|
this.supplierName = selection.supplierName;
|
|
this.supplierName = selection.supplierName;
|
|
this.supplierId = selection.supplierId;
|
|
this.supplierId = selection.supplierId;
|
|
- this.getPurchaseOrderNo();
|
|
|
|
},
|
|
},
|
|
currentRadioChange4(selection) {
|
|
currentRadioChange4(selection) {
|
|
this.unloadPointId = selection.warehouseId;
|
|
this.unloadPointId = selection.warehouseId;
|
|
@@ -362,120 +439,30 @@ export default {
|
|
this.lineId = selection.lineId;
|
|
this.lineId = selection.lineId;
|
|
},
|
|
},
|
|
currentRadioChange3(selection) {
|
|
currentRadioChange3(selection) {
|
|
- this.selectionList = [];
|
|
|
|
- this.selectionList = selection;
|
|
|
|
|
|
+ this.carriermapList = [];
|
|
|
|
+ this.carriermapList = selection;
|
|
},
|
|
},
|
|
// 确认
|
|
// 确认
|
|
- onClickConfirm() {
|
|
|
|
- var state = 0;
|
|
|
|
- if (
|
|
|
|
- this.materialId &&
|
|
|
|
- this.supplierId &&
|
|
|
|
- this.form1.purchaseOrderId &&
|
|
|
|
- this.unloadPointId &&
|
|
|
|
- sjTime(this.form1.orderEntryTime) &&
|
|
|
|
- this.lineId
|
|
|
|
- ) {
|
|
|
|
- state = 1;
|
|
|
|
- } else {
|
|
|
|
- if (!this.materialId) {
|
|
|
|
- this.$message({
|
|
|
|
- message: "请选择物资!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- } else if (!this.supplierId) {
|
|
|
|
- this.$message({
|
|
|
|
- message: "请选择发货单位!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- } else if (!this.purchaseOrderId) {
|
|
|
|
- this.$message({
|
|
|
|
- message: "没有匹配的采购订单号!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- } else if (!this.unloadPointId) {
|
|
|
|
- this.$message({
|
|
|
|
- message: "请选择卸货地点!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- } else if (!this.lineId) {
|
|
|
|
- this.$message({
|
|
|
|
- message: "请选择运输路线!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- } else if (!sjTime(this.form1.orderEntryTime)) {
|
|
|
|
- this.$message({
|
|
|
|
- message: "请选择预估进厂时间!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (this.selectionList.length == 0) {
|
|
|
|
- this.$message({
|
|
|
|
- message: "请选择车辆!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- state = 0;
|
|
|
|
- } else {
|
|
|
|
- this.selectionList.forEach((e) => {
|
|
|
|
- if (e.orderMaterialNumber || e.orderMaterialWeight) {
|
|
|
|
- if (
|
|
|
|
- isNumber(e.orderMaterialNumber) ||
|
|
|
|
- isNumber(e.orderMaterialWeight)
|
|
|
|
- ) {
|
|
|
|
- if (
|
|
|
|
- isIntegerNumber(e.orderMaterialNumber) ||
|
|
|
|
- isIntegerNumber(e.orderMaterialWeight)
|
|
|
|
- ) {
|
|
|
|
- state = 1;
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- message: "件数(重量)只能是整数!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- state = 0;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- message: "件数(重量)只能是数字!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- state = 0;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- message: "件数(重量)不能为空!",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- state = 0;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (state == 1) {
|
|
|
|
- let map = {
|
|
|
|
- materialId: this.materialId,
|
|
|
|
- supplierId: this.supplierId,
|
|
|
|
- purchaseOrderId: this.purchaseOrderId,
|
|
|
|
- unloadPointId: this.unloadPointId,
|
|
|
|
- orderEntryTime: sjTime(this.form1.orderEntryTime),
|
|
|
|
- driverCapacityIdList: this.selectionList,
|
|
|
|
- orderType: 5,
|
|
|
|
- lineId: this.lineId,
|
|
|
|
|
|
+ makeSure() {
|
|
|
|
+ console.log(this.tableData)
|
|
|
|
+ let amsOrder = {
|
|
|
|
+ supplierId:this.supplierId,
|
|
|
|
+ unloadPointId:this.unloadPointId,
|
|
|
|
+ lineId:this.lineId,
|
|
|
|
+ orderType:12,
|
|
|
|
+ carrierId: this.carrierId,
|
|
|
|
+ receiveId: this.receiveId,
|
|
|
|
+ mapList: this.tableData,
|
|
};
|
|
};
|
|
- console.log(map, map);
|
|
|
|
- this.$axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
|
|
|
|
|
|
+ console.log(amsOrder);
|
|
|
|
+ debugger
|
|
|
|
+ this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
|
|
if (res.data.code == "200") {
|
|
if (res.data.code == "200") {
|
|
- this.$message({
|
|
|
|
- message: "添加成功!",
|
|
|
|
- type: "success",
|
|
|
|
- });
|
|
|
|
- this.$router.push("/importedIngredients/transportReserveFu");
|
|
|
|
|
|
+ this.$router.push("/steelReturn/steelTransportAppoint");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- },
|
|
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -511,6 +498,13 @@ export default {
|
|
text-align: right;
|
|
text-align: right;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.orderType{
|
|
|
|
+ .text{
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 5.625rem;
|
|
|
|
+ text-align: right;
|
|
|
|
+ }
|
|
|
|
+}
|
|
.switch {
|
|
.switch {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 2.5rem;
|
|
height: 2.5rem;
|