|
@@ -98,6 +98,23 @@
|
|
|
:inline="true"
|
|
|
class="demo-form-inline"
|
|
|
label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="趟次">
|
|
|
+ <el-input
|
|
|
+ class="inline-input"
|
|
|
+ v-model="materialTimes"
|
|
|
+ placeholder="趟次-非必填"
|
|
|
+ :trigger-on-focus="false"
|
|
|
+ @input="onInputTimes()"
|
|
|
+ @blur="onblur()"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ label-width="80px"
|
|
|
>
|
|
|
<el-form-item label="选择物资">
|
|
|
</el-form-item>
|
|
@@ -282,6 +299,10 @@ export default {
|
|
|
{
|
|
|
value:14,
|
|
|
label:'中转'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value:19,
|
|
|
+ label:'退货'
|
|
|
}
|
|
|
],
|
|
|
orderType:null,
|
|
@@ -400,6 +421,16 @@ export default {
|
|
|
this.$message.warning('趟次请输入数字')
|
|
|
}
|
|
|
},
|
|
|
+ onblur(){
|
|
|
+ this.isMoreTrips = false
|
|
|
+ if(this.materaialTimes <= 0){
|
|
|
+ this.$message.warning('趟次必须大于0')
|
|
|
+ this.materialTimes = null
|
|
|
+ }
|
|
|
+ if(this.materialTimes > 1 ){
|
|
|
+ this.isMoreTrips = true
|
|
|
+ }
|
|
|
+ },
|
|
|
onInputPriority(scope){
|
|
|
if(!isNumber(scope)){
|
|
|
this.$message.warning('装卸货次序请输入数字')
|
|
@@ -426,6 +457,9 @@ export default {
|
|
|
if(this.orderType == 14){
|
|
|
this.inputLine = "零星中转"
|
|
|
}
|
|
|
+ if(this.orderType == 19){
|
|
|
+ this.inputLine = "退货"
|
|
|
+ }
|
|
|
},
|
|
|
drawTable(){
|
|
|
this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395" +"&test=" + new Date()
|
|
@@ -517,7 +551,8 @@ export default {
|
|
|
materialSpecification:e.materialSpecification,
|
|
|
materialName:e.materialName,
|
|
|
materialCode:e.materialCode,
|
|
|
- materialId:e.materialId
|
|
|
+ materialId:e.materialId,
|
|
|
+ materialPriority:1
|
|
|
}
|
|
|
this.tableData.push(addmap)
|
|
|
})
|
|
@@ -562,18 +597,12 @@ export default {
|
|
|
},
|
|
|
// 确认
|
|
|
makeSure() {
|
|
|
- let amOrder = {
|
|
|
- supplierId:this.supplierId,
|
|
|
- lineId:this.lineId,
|
|
|
- carrierId: this.carrierId,
|
|
|
- orderType:this.orderType,
|
|
|
- receiveId: this.consigneeId,
|
|
|
- userId:getCookie("orgCode"),
|
|
|
- mapList: this.tableData,
|
|
|
- isMoreTrips:Number(this.isMoreTrips)
|
|
|
+ if(this.isMoreTrips == false){
|
|
|
+ this.materialTimes = 1
|
|
|
+ }
|
|
|
+ if(Number(this.materialTimes) != 0){
|
|
|
+ this.isMoreTrips = true
|
|
|
}
|
|
|
- console.log(amOrder)
|
|
|
- debugger
|
|
|
this.disabled = true
|
|
|
if(this.supplierId==null||this.lineId==null||this.consigneeId==null||this.carrierId==null){
|
|
|
this.disabled = false
|
|
@@ -609,10 +638,13 @@ export default {
|
|
|
orderType:this.orderType,
|
|
|
receiveId: this.consigneeId,
|
|
|
userId:getCookie("orgCode"),
|
|
|
+ orderTime:this.materialTimes,
|
|
|
mapList: this.tableData,
|
|
|
isMoreTrips:Number(this.isMoreTrips)
|
|
|
|
|
|
};
|
|
|
+ console.log(amsOrder)
|
|
|
+ debugger
|
|
|
this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
|
|
|
if (res.data.code == "200") {
|
|
|
this.onClickCancel()
|