luobang 2 rokov pred
rodič
commit
eb4609dec9

+ 2 - 2
build/utils.js

@@ -26,8 +26,8 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 
 // let devModules = ["index", "appoint", "statisticalReport", "WMS"];
 // let devModules = ["index", "appoint", "inward", "statisticalReport", "RMS"];
-// let devModules = ["index", "appoint", "sale", "statisticalReport", "inward"];
-// let devModules = ["index", "statisticalReport", "appoint", "TMS"];
+// let devModules = ["index", "appoint", "inward", "TMS"];
+// let devModules = ["all"];
 let devModules = ["all"];
 // let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS','WMS']
 // let devModules = ["index", "ADMINISTRATORS", "RMS"];

+ 3 - 2
config/index.js

@@ -67,14 +67,15 @@ let proxyTable = {
   "/api/v1": {
     target: "http://172.16.33.166:80",
     // target: "http://localhost:8080",
-    // target: "http://192.168.1.110:8080",
+    // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
     }
   },
   "/views/api/v1": {
-    target: "http://172.16.33.166:80",
+    // target: "http://172.16.33.166:80",
+    target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"

+ 538 - 508
src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue

@@ -4,125 +4,100 @@
   <div class="addSporadic">
     <page-title>运输预约</page-title>
     <div class="form-box">
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-        >
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="发货单位">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateSupplier"
-          :fetch-suggestions="querySearchSupplier"
-          placeholder="请输入发货单位名称"
-          :trigger-on-focus="false"
-          @select="handleSelectSupplier"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.supplierName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateSupplier"
+            :fetch-suggestions="querySearchSupplier"
+            placeholder="请输入发货单位名称"
+            :trigger-on-focus="false"
+            @select="handleSelectSupplier"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.supplierName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-        >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="收货单位">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateConsignee"
-          :fetch-suggestions="querySearchConsignee"
-          placeholder="请输入收货单位名称"
-          :trigger-on-focus="false"
-          @select="handleSelectConsignee"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.consigneeCompanyName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateConsignee"
+            :fetch-suggestions="querySearchConsignee"
+            placeholder="请输入收货单位名称"
+            :trigger-on-focus="false"
+            @select="handleSelectConsignee"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.consigneeCompanyName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="流向">
-        <el-select v-model="orderType" placeholder="请选择" @change="flowChange">
-        <el-option
-          v-for="item in orderTypeList"
-          :key="item.value"
-          :label="item.label" 
-          :value="item.value"
-        >
-        </el-option>
-      </el-select>
-      </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+          <el-select
+            v-model="orderType"
+            placeholder="请选择"
+            @change="flowChange"
+          >
+            <el-option
+              v-for="item in orderTypeList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="选择路线">
-          <el-input v-model="lineName" placeholder="必填" disabled>
-          </el-input>
+          <el-input v-model="lineName" placeholder="必填" disabled> </el-input>
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
         </el-form-item>
-        </el-form>
-         <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="选择承运商">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateCarrier"
-          :fetch-suggestions="querySearchCarrier"
-          placeholder="请输入承运商名称"
-          :trigger-on-focus="false"
-          @select="handleSelectCarrier"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.carrierName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateCarrier"
+            :fetch-suggestions="querySearchCarrier"
+            placeholder="请输入承运商名称"
+            :trigger-on-focus="false"
+            @select="handleSelectCarrier"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.carrierName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      </el-form>
+      <el-form :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-input
+            class="inline-input"
+            v-model="materialTimes"
+            placeholder="趟次-非必填"
+            :trigger-on-focus="false"
+            @input="onInputTimes()"
+            @blur="onblur()"
+          >
+          </el-input>
         </el-form-item>
-        <el-form-item > 
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
+        <el-form-item label="选择物资"> </el-form-item>
+        <el-form-item>
           <el-button type="primary" @click="drawTable" class="truckBtn"
-          >浏览</el-button>
+            >浏览</el-button
+          >
         </el-form-item>
-        </el-form>
+      </el-form>
     </div>
     <div class="lineId from">
       <span class="text">该批车辆是否一车多趟:</span>
@@ -130,183 +105,200 @@
       </el-switch>
     </div>
     <div class="swtichTop">
-    <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
-    <div class="switch" v-if="tableData.length > 0">
-      <el-tooltip placement="top">
-        <div slot="content">下面表格已有数据,不能进行更改!!!</div>
-        <el-switch
-          v-model="value"
-          active-text="件数"
-          inactive-text="重量"
-          disabled
-        >
-        </el-switch>
-      </el-tooltip>
-    </div>
-    <div class="switch" v-else>
-      <el-tooltip placement="top">
-        <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
-        <el-switch v-model="value" active-text="件数" inactive-text="重量">
-        </el-switch>
-      </el-tooltip>
-    </div>
+      <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
+      <div class="switch" v-if="tableData.length > 0">
+        <el-tooltip placement="top">
+          <div slot="content">下面表格已有数据,不能进行更改!!!</div>
+          <el-switch
+            v-model="value"
+            active-text="件数"
+            inactive-text="重量"
+            disabled
+          >
+          </el-switch>
+        </el-tooltip>
+      </div>
+      <div class="switch" v-else>
+        <el-tooltip placement="top">
+          <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
+          <el-switch v-model="value" active-text="件数" inactive-text="重量">
+          </el-switch>
+        </el-tooltip>
+      </div>
     </div>
     <!-- 物资表格 -->
     <div class="truckListTable">
-    <div class="selectionTable">
-      <el-table
-        :data="tableData"
-        border
-        style="width: 100%"
-        highlight-current-row
-      >
-        <el-table-column
-          v-for="(item, i) in tableTop"
-          :key="i"
-          :prop="item.prop"
-          :label="item.label"
-          align="center"
-          show-overflow-tooltip
+      <div class="selectionTable">
+        <el-table
+          :data="tableData"
+          border
+          style="width: 100%"
+          highlight-current-row
         >
-          <template slot="scope" v-if="item.label !== '件数'">
-            <span>{{ item.label }}</span>
-          </template>
-          <!-- 插入输入框 -->
-          <template slot-scope="scope">
-            <template v-if="item.slot">
+          <el-table-column
+            v-for="(item, i) in tableTop"
+            :key="i"
+            :prop="item.prop"
+            :label="item.label"
+            align="center"
+            show-overflow-tooltip
+          >
+            <template slot="scope" v-if="item.label !== '件数'">
+              <span>{{ item.label }}</span>
+            </template>
+            <!-- 插入输入框 -->
+            <template slot-scope="scope">
+              <template v-if="item.slot">
                 <!-- 装卸货优先级 -->
-               <template v-if="item.prop == 'materialPriority'">
-                <el-input
-                  class="textinput"
-                  v-model.number="scope.row.materialPriority"
-                  @input="onInputPriority(scope.row.materialPriority)"
-                ></el-input>
+                <template v-if="item.prop == 'materialPriority'">
+                  <el-input
+                    class="textinput"
+                    v-model.number="scope.row.materialPriority"
+                    @input="onInputPriority(scope.row.materialPriority)"
+                  ></el-input>
+                </template>
+                <!-- 物资件数 -->
+                <template v-if="item.prop == 'orderMaterialNumber'">
+                  <el-input
+                    class="textinput"
+                    v-model.number="scope.row.orderMaterialNumber"
+                    @input="onInputNumber(scope.row.orderMaterialNumber)"
+                  ></el-input>
+                </template>
+                <!-- 物资重量 -->
+                <template v-if="item.prop == 'orderMaterialWeight'">
+                  <el-input
+                    v-model.number="scope.row.orderMaterialWeight"
+                    @input="onInputWeight(scope.row.orderMaterialWeight)"
+                  ></el-input>
+                </template>
               </template>
-              <!-- 物资件数 -->
-              <template v-if="item.prop == 'orderMaterialNumber'">
-                <el-input
-                  class="textinput"
-                  v-model.number="scope.row.orderMaterialNumber"
-                  @input="onInputNumber(scope.row.orderMaterialNumber)"
-                ></el-input>
+              <template v-else>
+                <span>{{ scope.row[item.prop] }}</span>
               </template>
-              <!-- 物资重量 -->
-               <template v-if="item.prop == 'orderMaterialWeight'">
-                <el-input
-                  v-model.number="scope.row.orderMaterialWeight"
-                  @input="onInputWeight(scope.row.orderMaterialWeight)"
-                ></el-input>
-              </template>           
             </template>
-            <template v-else>
-              <span>{{ scope.row[item.prop] }}</span>
+          </el-table-column>
+          <!-- 操作列 -->
+          <el-table-column fixed="right" label="操作" width="100">
+            <template slot-scope="scope">
+              <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 fixed="right" label="操作" width="100">
-          <template slot-scope="scope">
-            <el-button
-              @click.native.prevent="deleteRow(scope.$index, tableData)"
-              type="text"
-              icon="el-icon-close"
-              size="big"
-            ></el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
+          </el-table-column>
+        </el-table>
+      </div>
     </div>
     <!-- 物资模态框 -->
     <div class="drawSty">
       <el-drawer
-      title="选择物资信息"
-      :visible.sync="table"
-      direction="rtl"
-      size="40%"
-      :show-close="false"
-    >
-      <el-input placeholder="请输入内容" v-model="inputMaterial" clearable > </el-input
-      ><el-button type="primary" class="btn" @click="onclickMaterial">
-        <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 ref="materialTable" v-bind.sync="materialOptions" @selection-change="selectionChange" :drawer="aaadrawer">
-        </dilTable>
-      </div>
-    </el-drawer>
-    <!-- 模态窗口 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" size="30%" :before-close="handleClose">
-      <el-input
-        placeholder="请输入内容"
-        v-model="input"
-        style="margin-top: 20px"
-        clearable
-      ></el-input>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="onclick(a)"
-        style="margin-bottom: 0.9375rem"
+        title="选择物资信息"
+        :visible.sync="table"
+        direction="rtl"
+        size="40%"
+        :show-close="false"
       >
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <div v-show="a == 5">
-        <dilTable
-          v-bind.sync="line"
-          @radio-change="currentRadioChange5"
-        ></dilTable>
-      </div>
-    </el-drawer>
-    </div>  
+        <el-input placeholder="请输入内容" v-model="inputMaterial" clearable>
+        </el-input
+        ><el-button type="primary" class="btn" @click="onclickMaterial">
+          <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
+            ref="materialTable"
+            v-bind.sync="materialOptions"
+            @selection-change="selectionChange"
+            :drawer="aaadrawer"
+          >
+          </dilTable>
+        </div>
+      </el-drawer>
+      <!-- 模态窗口 -->
+      <el-drawer
+        :visible.sync="drawer"
+        :direction="direction"
+        size="30%"
+        :before-close="handleClose"
+      >
+        <el-input
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 20px"
+          clearable
+        ></el-input>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclick(a)"
+          style="margin-bottom: 0.9375rem"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <div v-show="a == 5">
+          <dilTable
+            ref="dilTabRef"
+            v-bind.sync="line"
+            @radio-change="currentRadioChange5"
+            :isKuang="isKuang"
+          ></dilTable>
+        </div>
+      </el-drawer>
+    </div>
     <div class="button-box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="makeSure" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="makeSure" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      inputLine:null,
-      aaadrawer:false,
-      disabled:false,
-      materialTimes:null,
+      isKuang: false,
+      inputLine: null,
+      aaadrawer: false,
+      disabled: false,
+      materialTimes: null,
       options: [],
-      value: '',
-      receiveName:'',
-      stateCarrier:null,
-      stateSupplier:null,
-      stateConsignee:null,
-      restaurantsConsignee:null,
-      restaurantsSupplier:null,
-      orderTypeList:[
+      value: "",
+      receiveName: "",
+      stateCarrier: null,
+      stateSupplier: null,
+      stateConsignee: null,
+      restaurantsConsignee: null,
+      restaurantsSupplier: null,
+      orderTypeList: [
+        {
+          value: 12,
+          label: "进厂"
+        },
         {
-          value:12,
-          label:'进厂'
-        },{
-          value:13,
-          label:'出厂'
+          value: 13,
+          label: "出厂"
         },
         {
-          value:14,
-          label:'中转'
+          value: 14,
+          label: "中转"
         },
         {
-          value:19,
-          label:'退货'
+          value: 19,
+          label: "退货"
         }
       ],
-      orderType:null,
-      restaurantsCarrier:null,
+      orderType: null,
+      restaurantsCarrier: null,
       // 线路名称
       lineName: "",
       //线路id
@@ -322,37 +314,37 @@ export default {
         {
           prop: "materialCode",
           label: "物资编码",
-          width: "160",
+          width: "160"
         },
         {
           prop: "materialName",
           label: "物资名称",
-          width: "140",
+          width: "140"
         },
         {
           prop: "materialSpecification",
           label: "规格型号",
-          width: "140",
+          width: "140"
         },
         {
           prop: "materialPriority",
           label: "装卸货优先级",
-          slot: true,
+          slot: true
         },
         {
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true,
-        },
+          slot: true
+        }
       ],
       // 收货单位ID
-      receiveId:null,
+      receiveId: null,
       //承运商ID
-      carrierId:null,
+      carrierId: null,
       //物资表格数据
       tableData: [],
       selectionList1: [],
-      newsArr:[],
+      newsArr: [],
       //物资名称
       materialName: "",
       //发货单位名称
@@ -362,177 +354,207 @@ export default {
       //物资id
       materialId: null,
       //承运商id
-      carrierId:null,
+      carrierId: null,
       //是否需要打开模态窗口
       drawer: false,
       a: 1,
       direction: "rtl",
-      inputMaterial:null,
-      input:null,
+      inputMaterial: null,
+      input: null,
       //物资模态框
-      materialOptions:{
-          requestUrl:"",
-          selectionType: "select",
+      materialOptions: {
+        requestUrl: "",
+        selectionType: "select"
       },
       line: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
-      row: {},
+      row: {}
     };
   },
   watch: {
     value() {
       if (this.value) {
-        console.log(this.value)
-        console.log(this.tableTop.length)
+        console.log(this.value);
+        console.log(this.tableTop.length);
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
           prop: "orderMaterialNumber",
           label: "件数",
-          slot: true,
+          slot: true
         });
       } else {
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true,
+          slot: true
         });
       }
-    },
+    }
   },
   methods: {
     //关闭运输线路
-    handleClose(done){
-        done()
-        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
+    handleClose(done) {
+      done();
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
     },
-    onclickMaterial(){
-        if(this.inputMaterial != null){
-          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&index=" + this.inputMaterial
-        }
-        else{
-          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"
-        }
+    onclickMaterial() {
+      if (this.inputMaterial != null) {
+        this.materialOptions.requestUrl =
+          "/api/v1/uc/selectAllMaterialName?apiId=395&index=" +
+          this.inputMaterial;
+      } else {
+        this.materialOptions.requestUrl =
+          "/api/v1/uc/selectAllMaterialName?apiId=395";
+      }
     },
-    onInputTimes(){
-      if(!isNumber(this.materialTimes)){
-        this.$message.warning('趟次请输入数字')
+    onInputTimes() {
+      if (!isNumber(this.materialTimes)) {
+        this.$message.warning("趟次请输入数字");
       }
     },
-    onblur(){
-      this.isMoreTrips = false
-      if(this.materaialTimes <= 0){
-        this.$message.warning('趟次必须大于0')
-        this.materialTimes = null
+    onblur() {
+      this.isMoreTrips = false;
+      if (this.materaialTimes <= 0) {
+        this.$message.warning("趟次必须大于0");
+        this.materialTimes = null;
       }
-      if(this.materialTimes > 1 ){
-        this.isMoreTrips = true
+      if (this.materialTimes > 1) {
+        this.isMoreTrips = true;
       }
     },
-    onInputPriority(scope){
-      if(!isNumber(scope)){
-        this.$message.warning('装卸货次序请输入数字')
+    onInputPriority(scope) {
+      if (!isNumber(scope)) {
+        this.$message.warning("装卸货次序请输入数字");
       }
     },
-    onInputWeight(scope){
-      if(!isNumber(scope)){
-        this.$message.warning('重量请输入数字')
+    onInputWeight(scope) {
+      if (!isNumber(scope)) {
+        this.$message.warning("重量请输入数字");
       }
     },
-    onInputNumber(scope){
-      if(!isNumber(scope)){
-        this.$message.warning('件数请输入数字')
+    onInputNumber(scope) {
+      if (!isNumber(scope)) {
+        this.$message.warning("件数请输入数字");
       }
     },
     //流向选择框变动后
-    flowChange(){
-      if(this.orderType == 12){
-        this.inputLine = "零星进厂"
+    flowChange() {
+      if (this.orderType == 12) {
+        this.inputLine = "零星进厂";
       }
-      if(this.orderType == 13){
-        this.inputLine = "零星出厂"
+      if (this.orderType == 13) {
+        this.inputLine = "零星出厂";
       }
-      if(this.orderType == 14){
-        this.inputLine = "零星中转"
+      if (this.orderType == 14) {
+        this.inputLine = "零星中转";
       }
-      if(this.orderType == 19){
-        this.inputLine = "退货"
+      if (this.orderType == 19) {
+        this.inputLine = "退货";
       }
     },
-    drawTable(){
-      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395" +"&test=" + new Date()
-      this.selectionList1 = []
-      this.table = true
+    drawTable() {
+      this.materialOptions.requestUrl =
+        "/api/v1/uc/selectAllMaterialName?apiId=395" + "&test=" + new Date();
+      this.selectionList1 = [];
+      this.table = true;
     },
     //收货单位弹出层
-    handleSelectConsignee(item){   
-      this.consigneeId = item.consigneeId
-      item.consigneeCompanyName = this.consigneeCompanyName
-  
+    handleSelectConsignee(item) {
+      this.consigneeId = item.consigneeId;
+      item.consigneeCompanyName = this.consigneeCompanyName;
     },
     //以下是发货单位边输边查搜索
     querySearchConsignee(queryString, cb) {
-      this.axios.post('/api/v1/uc/getConsigneeByLike?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          console.log(res)
-          var restaurantsConsignee = res.data.data
-          var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
+      this.axios
+        .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            console.log(res);
+            var restaurantsConsignee = res.data.data;
+            var results = queryString
+              ? restaurantsConsignee.filter(
+                  this.createFilterConsignee(queryString)
+                )
+              : restaurantsConsignee;
             // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-      })    
-      },
+            cb(results);
+          }
+        });
+    },
     createFilterConsignee(queryString) {
-        return (restaurantsConsignee) => {
-          return (restaurantsConsignee.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
-      //以上是返回单位边输边查搜索
-     //发货单位弹出层
-    handleSelectSupplier(item){
-      this.supplierId = item.supplierId
-      item.supplierName = this.supplierName
+      return restaurantsConsignee => {
+        return (
+          restaurantsConsignee.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
+    //以上是返回单位边输边查搜索
+    //发货单位弹出层
+    handleSelectSupplier(item) {
+      this.supplierId = item.supplierId;
+      item.supplierName = this.supplierName;
     },
     //以下是发货单位边输边查搜索
     querySearchSupplier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
-        if(res.data.code == "200"){    
-          var restaurantsSupplier = res.data.data
-          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
-          // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-      })  
-      },
+      this.axios
+        .post("/api/v1/uc/getSupplierMesByLike?index=" + this.stateSupplier)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurantsSupplier = res.data.data;
+            var results = queryString
+              ? restaurantsSupplier.filter(
+                  this.createFilterSupplier(queryString)
+                )
+              : restaurantsSupplier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterSupplier(queryString) {
-        return (restaurantsSupplier) => {
-          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return restaurantsSupplier => {
+        return (
+          restaurantsSupplier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     //承运商弹出层
-    handleSelectCarrier(item){    
-      this.carrierId = item.carrierId
-      item.carrierName = this.stateCarrier
+    handleSelectCarrier(item) {
+      this.carrierId = item.carrierId;
+      item.carrierName = this.stateCarrier;
     },
     //以下是承运商边输边查搜索
     querySearchCarrier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          var restaurantsCarrier = res.data.data
-          console.log(restaurantsCarrier,"restaurantsCarrier");
-          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
-           // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-        })     
-      },
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurantsCarrier = res.data.data;
+            console.log(restaurantsCarrier, "restaurantsCarrier");
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterCarrier(queryString) {
-        return (restaurantsCarrier)  =>  {
-          return (restaurantsCarrier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     //以上是承运商边输边查搜索
     //删除行
     deleteRow(index, rows) {
@@ -540,36 +562,36 @@ export default {
     },
     // 返回主界面
     makeSure1() {
-        var arr = []
-        for (let i = 0; i < this.newsArr.length; i++) {
-        if(arr.indexOf(this.newsArr[i]) === -1){
-            arr.push(this.newsArr[i]);
+      var arr = [];
+      for (let i = 0; i < this.newsArr.length; i++) {
+        if (arr.indexOf(this.newsArr[i]) === -1) {
+          arr.push(this.newsArr[i]);
         }
-        }
-        arr.forEach( (e) => {
-          let addmap = {
-            materialSpecification:e.materialSpecification,
-            materialName:e.materialName,
-            materialCode:e.materialCode,
-            materialId:e.materialId,
-            materialPriority:1
-          }
-          this.tableData.push(addmap)
-        })
-        this.newsArr = []
-        this.table = false
+      }
+      arr.forEach(e => {
+        let addmap = {
+          materialSpecification: e.materialSpecification,
+          materialName: e.materialName,
+          materialCode: e.materialCode,
+          materialId: e.materialId,
+          materialPriority: 1
+        };
+        this.tableData.push(addmap);
+      });
+      this.newsArr = [];
+      this.table = false;
     },
-      // 返回选中的物资信息
+    // 返回选中的物资信息
     selectionChange(selection) {
-      console.log(selection)
-      this.selectionList1 = []
-      this.selectionList1 = selection
-      this.newsArr = []
+      console.log(selection);
+      this.selectionList1 = [];
+      this.selectionList1 = selection;
+      this.newsArr = [];
       for (let i = 0; i < this.selectionList1.length; i++) {
-        if(this.newsArr.indexOf(this.selectionList1[i]) === -1){
-        this.newsArr.push(this.selectionList1[i]);
-        }
+        if (this.newsArr.indexOf(this.selectionList1[i]) === -1) {
+          this.newsArr.push(this.selectionList1[i]);
         }
+      }
     },
     onclick(a) {
       if (a == 5) {
@@ -579,7 +601,11 @@ export default {
     },
     ondrawer(num) {
       this.line.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" + "&t=" + new Date() + "&con=" + this.inputLine;
+        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" +
+        "&t=" +
+        new Date() +
+        "&con=" +
+        this.inputLine;
       this.drawer = true;
       this.a = num;
     },
@@ -588,139 +614,143 @@ export default {
       this.$router.push("/oldSporadicAppoint");
     },
     currentRadioChange5(selection) {
-      if(selection.lineName == null &&selection.lineDesk == null){
-          this.lineName = ''
-      }else{
-          this.lineName = selection.lineName+'  '+selection.lineDesk 
-          this.lineId = selection.lineId;
-      }    
+      if (selection.lineName == null && selection.lineDesk == null) {
+        this.lineName = "";
+      } else {
+        this.lineName = selection.lineName + "  " + selection.lineDesk;
+        this.lineId = selection.lineId;
+      }
     },
     // 确认
     makeSure() {
-        if(this.isMoreTrips == false){
-          this.materialTimes = 1
-        }
-        if(Number(this.materialTimes) != 0){
-          this.isMoreTrips = true
-        }
-        this.disabled = true
-        if(this.supplierId==null||this.lineId==null||this.consigneeId==null||this.carrierId==null){
-          this.disabled = false
-          this.$message.warning("存在值未填写")
-          return
-        }else if(this.tableData.length == 0){
-          this.disabled = false
-          this.$message.warning("请点击浏览勾选物资")
-          return
-        }
-        var i = 0;
-        var j = 0;
-        this.tableData.forEach((e) => {
-          if(e.materialPriority == null){
-            i++
-          }else if(e.orderMaterialWeight == null){            
-            j++
-          }            
-        })
-        if(i != 0){
-           this.$message.warning("装卸货优先级未填写")
-           this.disabled = false
-           return
-        }else if(j != 0){
-           this.$message.warning("物资重量未填写")
-           this.disabled = false
-           return
+      if (this.isMoreTrips == false) {
+        this.materialTimes = 1;
+      }
+      if (Number(this.materialTimes) != 0) {
+        this.isMoreTrips = true;
+      }
+      this.disabled = true;
+      if (
+        this.supplierId == null ||
+        this.lineId == null ||
+        this.consigneeId == null ||
+        this.carrierId == null
+      ) {
+        this.disabled = false;
+        this.$message.warning("存在值未填写");
+        return;
+      } else if (this.tableData.length == 0) {
+        this.disabled = false;
+        this.$message.warning("请点击浏览勾选物资");
+        return;
+      }
+      var i = 0;
+      var j = 0;
+      this.tableData.forEach(e => {
+        if (e.materialPriority == null) {
+          i++;
+        } else if (e.orderMaterialWeight == null) {
+          j++;
         }
-        let amsOrder = {
-          supplierId:this.supplierId,
-          lineId:this.lineId,
-          carrierId: this.carrierId,
-          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()
-            this.disabled = false
-          }else{
-            this.disabled = false
-          }
-        });
+      });
+      if (i != 0) {
+        this.$message.warning("装卸货优先级未填写");
+        this.disabled = false;
+        return;
+      } else if (j != 0) {
+        this.$message.warning("物资重量未填写");
+        this.disabled = false;
+        return;
       }
-    },
+      let amsOrder = {
+        supplierId: this.supplierId,
+        lineId: this.lineId,
+        carrierId: this.carrierId,
+        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();
+          this.disabled = false;
+        } else {
+          this.disabled = false;
+        }
+      });
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
-.addSporadic{
+.addSporadic {
   .contractDetails {
-  width: 100%;
-}
-.drawSty{
-  .el-input{
-    width: 240px;
+    width: 100%;
   }
-}
-.lineId {
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 190px;
-    text-align: right;
-    font-size: 16px;
+  .drawSty {
+    .el-input {
+      width: 240px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .lineId {
+    display: flex;
+    justify-content: center;
+    .text {
+      display: inline-block;
+      width: 190px;
+      text-align: right;
+      font-size: 16px;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
+    .span {
+      display: inline-block;
+      width: 70px;
+      height: 1px;
+    }
   }
-  .span {
-    display: inline-block;
-    width: 70px;
-    height: 1px;
+  .swtichTop {
+    display: flex;
+    height: 40px;
+    align-content: center;
+    justify-content: center;
+    padding-right: 20px;
+    .titile {
+      color: red;
+      font-size: 14px;
+    }
+    .switch {
+      margin-right: -60px;
+    }
   }
-}
-.swtichTop{
-  display: flex;
-  height: 40px;
-  align-content: center;
-  justify-content: center;
-  padding-right:20px ;
-  .titile{
-    color: red;
-    font-size: 14px;
-  }
-  .switch{
-    margin-right: -60px
+  .form-box {
+    display: inline-block !important;
+    margin-left: 488px;
+    .el-input {
+      width: 320px;
+    }
+    .el-select {
+      width: 320px;
+    }
+    .el-autocomplete {
+      width: 320px;
+    }
+    .el-form {
+      padding: 10px;
+    }
+    .truckBtn {
+      width: 320px;
+    }
   }
-}
-.form-box {
-  display: inline-block !important;
-  margin-left: 488px;
-  .el-input {
-    width: 320px;
+  .button-box {
+    margin-left: 45%;
   }
-  .el-select{
-    width: 320px;
-  }
-  .el-autocomplete{
-    width: 320px;
-  }
-  .el-form {
-    padding: 10px;
-  }
-  .truckBtn{
-    width: 320px;
-  }
-}
-.button-box {
-  margin-left: 45% ;
-}
 }
-</style>
+</style>

+ 5 - 0
src/views/TMS/components/bmsship/addMoistureDetection.vue

@@ -73,12 +73,14 @@
         <dilTable
           v-bind.sync="batchOption"
           @radio-change="batchChange"
+          :isKuang="isKuang"
         ></dilTable>
       </div>
       <div v-show="a == 6">
         <dilTable
           v-bind.sync="contractPriceOption"
           @radio-change="priceChange"
+          :isKuang="isKuang"
         ></dilTable>
       </div>
     </el-drawer>
@@ -101,6 +103,8 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isKuang: false,
+
       spell: false,
       noSpell: "false",
       value1: false,
@@ -154,6 +158,7 @@ export default {
     //右侧选中框
     ondrawer(num) {
       this.drawer = true;
+      this.isKuang = true;
       this.a = num;
       if (num == 5) {
         this.batchOption.requestUrl =

+ 35 - 0
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -421,6 +421,16 @@
             >
           </template>
         </el-table-column>
+        <el-table-column fixed="right" width="80">
+          <template slot-scope="scope">
+            <el-button
+              @click.native.prevent="copyRowfluAll(scope.$index, scope.row)"
+              type="text"
+              size="big"
+              >复制整车</el-button
+            >
+          </template>
+        </el-table-column>
       </el-table>
     </div>
     <!-- 收货地址弹出框 -->
@@ -1394,6 +1404,23 @@ export default {
       // this.selectionList.push(copyRowflu);
       this.getSpanArr(this.selectionList);
     },
+    copyRowfluAll(index, row) {
+      let arr = [];
+      //复制整车,根据车序号去寻找相同的列
+      arr = this.selectionList.concat([]).filter((item, index) => {
+        return item.cxh == row.cxh;
+      });
+      arr.forEach(e => {
+        let copyRow = new Object();
+        Object.keys(e).forEach(key => {
+          copyRow[key] = e[key];
+        });
+        copyRow.cxh = this.maxCxh;
+        this.selectionList.push(copyRow);
+      });
+      this.getSpanArr(this.selectionList);
+      this.maxCxh++;
+    },
     singleDistribute() {
       let ml = this.materialList.length;
       if (ml == 0) {
@@ -1767,6 +1794,14 @@ export default {
           colspan: _col
         };
       }
+      if (columnIndex === 10) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
     },
     //点击外层收货地址浏览事件
     ondrawerOut() {

+ 1 - 1
src/views/appoint/components/saleContract/importExcelSaleOrder.vue

@@ -87,7 +87,7 @@ export default {
   },
   data() {
     return {
-      columnIndexList: [0, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
+      columnIndexList: [0, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
       spanArr: [],
       tableData1: this.tableData
     };

+ 2 - 1
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -773,8 +773,9 @@ export default {
               saleOrderId: row.saleOrderId,
               reason: value
             };
+            console.log(mapValue);
             this.axios
-              .post("/api/v1/ams/deleteSaleOrderById", mapValue)
+              .post("/api/v1/ams/deleteSaleOrderSame", mapValue)
               .then(res => {
                 if (res.data.code == 200) {
                   this.$message.success("关闭成功");