|
@@ -67,6 +67,8 @@
|
|
|
<template v-if="item.prop == 'orderPlanWeight'">
|
|
|
<el-input
|
|
|
class="textinput"
|
|
|
+ @input="onInput"
|
|
|
+ placeholder="请输入内容(必填)"
|
|
|
v-model.number="scope.row.orderPlanWeight"
|
|
|
></el-input>
|
|
|
</template>
|
|
@@ -81,13 +83,14 @@
|
|
|
</el-input>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
+ placeholder="请输入内容(必填)"
|
|
|
@click="select(scope.$index,3)"
|
|
|
>浏览</el-button
|
|
|
>
|
|
|
</template>
|
|
|
<!-- 收货日期 -->
|
|
|
<template v-if="item.prop == 'saleDateOfReceipt'">
|
|
|
- <el-date-picker
|
|
|
+ <el-date-picker
|
|
|
class="textinput3"
|
|
|
type="date"
|
|
|
v-model.number="scope.row.saleDateOfReceipt"
|
|
@@ -97,6 +100,7 @@
|
|
|
<template v-if="item.prop == 'saleOrderConsignee'">
|
|
|
<el-input
|
|
|
class="textinput4"
|
|
|
+ placeholder="请输入内容(非必填)"
|
|
|
v-model.number="scope.row.saleOrderConsignee"
|
|
|
></el-input>
|
|
|
</template>
|
|
@@ -104,7 +108,9 @@
|
|
|
<template v-if="item.prop == 'saleOrderConsigneeTel'">
|
|
|
<el-input
|
|
|
class="textinput5"
|
|
|
+ placeholder="请输入内容(非必填)"
|
|
|
v-model.number="scope.row.saleOrderConsigneeTel"
|
|
|
+ @input="onInput"
|
|
|
></el-input>
|
|
|
</template>
|
|
|
</template>
|
|
@@ -192,7 +198,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
placeholder="请输入内容"
|
|
|
- v-model="lineText"
|
|
|
+ v-model="truckText"
|
|
|
style="margin-top: 10px; margin-left: 20px; width: 250px"
|
|
|
clearable
|
|
|
>
|
|
@@ -236,7 +242,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
placeholder="请输入内容"
|
|
|
- v-model="lineText"
|
|
|
+ v-model="addressText"
|
|
|
style="margin-top: 10px; margin-left: 20px; width: 250px"
|
|
|
clearable
|
|
|
>
|
|
@@ -276,7 +282,7 @@
|
|
|
<script>
|
|
|
import PageTitle from "@/components/Page/Title";
|
|
|
import { getCookie } from "@/utils/util.js";
|
|
|
-import { sjTime } from "@/utils/sharedJsFile";
|
|
|
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
|
|
|
export default {
|
|
|
components: { PageTitle },
|
|
|
data() {
|
|
@@ -325,6 +331,7 @@ export default {
|
|
|
requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
|
|
|
selectionType: "radio",
|
|
|
},
|
|
|
+ addressText:null,
|
|
|
//线路表格的框计算输入的值
|
|
|
lineText:null,
|
|
|
tableTop: [
|
|
@@ -379,6 +386,7 @@ export default {
|
|
|
width: "150",
|
|
|
},
|
|
|
],
|
|
|
+ truckText:null,
|
|
|
//当前多选选中的车辆
|
|
|
selectTruck:[],
|
|
|
//销售订单与物资表主键
|
|
@@ -401,17 +409,49 @@ export default {
|
|
|
this.option.requestUrl = "/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=" + this.$route.params.saleOrderId;
|
|
|
},
|
|
|
methods: {
|
|
|
+ onInput(val){
|
|
|
+ if(!isNumber(val)){
|
|
|
+ this.$message.warning('重量/电话号码请输入数字')
|
|
|
+ }
|
|
|
+ },
|
|
|
//点击确定按钮的事件
|
|
|
makeSure(){
|
|
|
- this.axios('/api/v1/ams/dispatchTruckOrderBySale',{
|
|
|
- saleOrderId:this.$route.params.saleOrderId,
|
|
|
- mapList:this.selectionList,
|
|
|
- }).then((res)=>{
|
|
|
- if(res.data.code == '200'){
|
|
|
- this.$message.success('派车成功')
|
|
|
- this.cancel();
|
|
|
+ let state = false;
|
|
|
+ this.selectionList.forEach((e)=>{
|
|
|
+ console.log(e.orderPlanWeight,"orderPlanWeight")
|
|
|
+ if(!isNumber(e.orderPlanWeight)){
|
|
|
+ this.$message.error('重量请输入数字')
|
|
|
+ }else if(e.saleOrderConsigneeTel){
|
|
|
+ if(!isNumber(e.saleOrderConsigneeTel)){
|
|
|
+ this.$message.error('电话号码请输入数字')
|
|
|
+ }else{
|
|
|
+ e.saleOrderConsigneeTel = e.saleOrderConsigneeTel+"",
|
|
|
+ state = true
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ e.saleOrderConsigneeTel = null,
|
|
|
+ state = true
|
|
|
}
|
|
|
+ if(e.saleDateOfReceipt){
|
|
|
+ e.saleDateOfReceipt = sjTime(e.saleDateOfReceipt)
|
|
|
+ }
|
|
|
+ console.log(typeof e.saleDateOfReceipt)
|
|
|
})
|
|
|
+
|
|
|
+ console.log(this.selectionList)
|
|
|
+ // if(state){
|
|
|
+ // this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
|
|
|
+ // saleOrderId:this.$route.params.saleOrderId,
|
|
|
+ // mapList:this.selectionList,
|
|
|
+ // }).then((res)=>{
|
|
|
+ // if(res.data.code == '200'){
|
|
|
+ // this.$message.success('派车成功')
|
|
|
+ // this.cancel();
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }else{
|
|
|
+ // this.$message.warning('重量/电话号码请输入数字')
|
|
|
+ // }
|
|
|
},
|
|
|
//点击取消按钮的事件
|
|
|
cancel(){
|
|
@@ -452,7 +492,9 @@ export default {
|
|
|
this.selectionList = arr;
|
|
|
},
|
|
|
//收货地址模态窗口的框计算
|
|
|
- selectAddressClick(){},
|
|
|
+ selectAddressClick(){
|
|
|
+ this.Address.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
|
|
|
+ },
|
|
|
//收货地址模态窗口的点击事件
|
|
|
addAddressClick(){
|
|
|
this.selectionList[this.addressIndex].saleShipperAddressName = this.addressMap.address
|
|
@@ -511,6 +553,14 @@ export default {
|
|
|
},
|
|
|
//车辆模态框框计算
|
|
|
selectTruckClick(){
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ this.truck.requestUrl =
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
|
|
|
+ getCookie("userId") + "&index="+this.truckText;
|
|
|
+ } else {
|
|
|
+ this.truck.requestUrl =
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.truckText;
|
|
|
+ }
|
|
|
},
|
|
|
//车辆表格
|
|
|
currentRadioChange1(select){
|
|
@@ -531,17 +581,18 @@ export default {
|
|
|
if (num == 1) {
|
|
|
this.drawer = true;
|
|
|
}else if(num == 2){
|
|
|
- // if(!this.materialId){
|
|
|
- // this.$message.warning('请选择物资后,在点击')
|
|
|
- // }else if(!this.lineId){
|
|
|
- // this.$message.warning('请选择线路后,在点击')
|
|
|
- // }else{
|
|
|
+ if(!this.materialId){
|
|
|
+ this.$message.warning('请选择物资后,在点击')
|
|
|
+ }else if(!this.lineId){
|
|
|
+ this.$message.warning('请选择线路后,在点击')
|
|
|
+ }else{
|
|
|
this.truckDrawer = true;
|
|
|
- // }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
//线路表格的框计算
|
|
|
selectClick(){
|
|
|
+ this.line.requestUrl = '/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con='+this.lineText;
|
|
|
},
|
|
|
//线路表格的确定事件
|
|
|
AddClick(){
|