|  | @@ -14,6 +14,8 @@
 | 
	
		
			
				|  |  |            <!-- <el-button  :size="size" :type="type" @click="check(row)">查看</el-button> -->
 | 
	
		
			
				|  |  |            <el-button :size="size" :disabled="row.status !== '待出库' && row.item >= 1" :type="type"
 | 
	
		
			
				|  |  |              @click="$refs.crud.rowDel(row, index)">删除</el-button>
 | 
	
		
			
				|  |  | +          <el-button :size="size" :type="type"
 | 
	
		
			
				|  |  | +                     @click="deliverGoods(row)">发货</el-button>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot="corpNameSearch">
 | 
	
		
			
				|  |  |            <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
 | 
	
	
		
			
				|  | @@ -33,13 +35,65 @@
 | 
	
		
			
				|  |  |        </avue-crud>
 | 
	
		
			
				|  |  |      </basic-container>
 | 
	
		
			
				|  |  |      <detailsPage v-if="detailsOpen" :onLoad="form" :detailData="detailData" @backToList="backToList"></detailsPage>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <el-dialog
 | 
	
		
			
				|  |  | +      title="发货"
 | 
	
		
			
				|  |  | +      :visible.sync="dialogVisible"
 | 
	
		
			
				|  |  | +      append-to-body
 | 
	
		
			
				|  |  | +      close-on-click-modal
 | 
	
		
			
				|  |  | +      close-on-press-escape
 | 
	
		
			
				|  |  | +      width="40%">
 | 
	
		
			
				|  |  | +      <div class="elForm">
 | 
	
		
			
				|  |  | +        <el-form :model="dialogForm" label-position="right">
 | 
	
		
			
				|  |  | +          <el-col :span="24">
 | 
	
		
			
				|  |  | +            <el-form-item label="收货人姓名:" label-width="100px">
 | 
	
		
			
				|  |  | +              <span>{{ dialogForm.contacts }}</span>
 | 
	
		
			
				|  |  | +            </el-form-item>
 | 
	
		
			
				|  |  | +            <el-form-item label="收货人电话:" label-width="100px">
 | 
	
		
			
				|  |  | +              <span>{{ dialogForm.phone }}</span>
 | 
	
		
			
				|  |  | +            </el-form-item>
 | 
	
		
			
				|  |  | +            <el-form-item label="收货人地址:" label-width="100px">
 | 
	
		
			
				|  |  | +              <span>{{ dialogForm.recAddress }}</span>
 | 
	
		
			
				|  |  | +            </el-form-item>
 | 
	
		
			
				|  |  | +          </el-col>
 | 
	
		
			
				|  |  | +          <el-form-item label="配送方式" label-width="100px">
 | 
	
		
			
				|  |  | +            <el-select v-model="dialogForm.shipType" @change="courierTypeChange" style="width: 90%;" placeholder="请选择运输类型">
 | 
	
		
			
				|  |  | +              <el-option
 | 
	
		
			
				|  |  | +                v-for="item in courierTypeList"
 | 
	
		
			
				|  |  | +                :key="item.dictKey"
 | 
	
		
			
				|  |  | +                :label="item.dictValue"
 | 
	
		
			
				|  |  | +                :value="item.dictValue">
 | 
	
		
			
				|  |  | +              </el-option>
 | 
	
		
			
				|  |  | +            </el-select>
 | 
	
		
			
				|  |  | +          </el-form-item>
 | 
	
		
			
				|  |  | +          <el-form-item label="货运公司" label-width="100px">
 | 
	
		
			
				|  |  | +            <el-select v-model="dialogForm.logisticsCorpName" filterable allow-create default-first-option style="width: 90%;" placeholder="请选择货运公司">
 | 
	
		
			
				|  |  | +              <el-option
 | 
	
		
			
				|  |  | +                v-for="item in courierList"
 | 
	
		
			
				|  |  | +                :key="item.dictKey"
 | 
	
		
			
				|  |  | +                :label="item.dictValue"
 | 
	
		
			
				|  |  | +                :value="item.dictValue">
 | 
	
		
			
				|  |  | +              </el-option>
 | 
	
		
			
				|  |  | +            </el-select>
 | 
	
		
			
				|  |  | +          </el-form-item>
 | 
	
		
			
				|  |  | +          <el-form-item label="货运单号" label-width="100px">
 | 
	
		
			
				|  |  | +            <el-input v-model="dialogForm.expressNo" style="width: 90%;" placeholder="请输入货运单号"></el-input>
 | 
	
		
			
				|  |  | +          </el-form-item>
 | 
	
		
			
				|  |  | +        </el-form>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +      <span slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  | +        <el-button size="small" @click="dialogVisible = false">取 消</el-button>
 | 
	
		
			
				|  |  | +        <el-button size="small" type="primary" @click="confirmShipment">确认发货</el-button>
 | 
	
		
			
				|  |  | +      </span>
 | 
	
		
			
				|  |  | +    </el-dialog>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import { getList, remove, getGoodsInfo } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
 | 
	
		
			
				|  |  | +import { getList, remove, getGoodsInfo, getDetails, shipments } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
 | 
	
		
			
				|  |  |  import detailsPage from "./detailsPage"
 | 
	
		
			
				|  |  | -import { getDetails } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
 | 
	
		
			
				|  |  | +import {getWorkDicts} from "../../../../api/system/dictbiz";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "index",
 | 
	
	
		
			
				|  | @@ -48,6 +102,10 @@ export default {
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | +      dialogVisible: false,
 | 
	
		
			
				|  |  | +      dialogForm: {},
 | 
	
		
			
				|  |  | +      courierTypeList: [],
 | 
	
		
			
				|  |  | +      courierList: [],
 | 
	
		
			
				|  |  |        detailsOpen: false,
 | 
	
		
			
				|  |  |        loading: false,
 | 
	
		
			
				|  |  |        search: {},
 | 
	
	
		
			
				|  | @@ -135,7 +193,7 @@ export default {
 | 
	
		
			
				|  |  |          searchMenuPosition: "right",
 | 
	
		
			
				|  |  |          align: "center",
 | 
	
		
			
				|  |  |          size: "small",
 | 
	
		
			
				|  |  | -        menuWidth: 50,
 | 
	
		
			
				|  |  | +        menuWidth: 100,
 | 
	
		
			
				|  |  |          searchSpan: 8,
 | 
	
		
			
				|  |  |          searchIcon: true,
 | 
	
		
			
				|  |  |          searchIndex: 2,
 | 
	
	
		
			
				|  | @@ -418,6 +476,48 @@ export default {
 | 
	
		
			
				|  |  |            });
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 发货按钮
 | 
	
		
			
				|  |  | +    deliverGoods(row) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      // 获取运输类型
 | 
	
		
			
				|  |  | +      getWorkDicts("deliveryMethod").then(res => {
 | 
	
		
			
				|  |  | +        this.courierTypeList = res.data.data;
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +      // 获取快递公司
 | 
	
		
			
				|  |  | +      getWorkDicts("tyre_express_company").then(res => {
 | 
	
		
			
				|  |  | +        this.courierList = res.data.data;
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      this.dialogForm = row
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      this.dialogVisible = true
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    courierTypeChange() {
 | 
	
		
			
				|  |  | +      this.dialogForm.courierCorporation = null
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 发货
 | 
	
		
			
				|  |  | +    confirmShipment() {
 | 
	
		
			
				|  |  | +      for (let courierCompanies of this.courierList) {
 | 
	
		
			
				|  |  | +        if (courierCompanies.dictValue === this.dialogForm.logisticsCorpName) {
 | 
	
		
			
				|  |  | +          this.dialogForm.logisticsCorpId = courierCompanies.dictKey
 | 
	
		
			
				|  |  | +          break
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      const requestBody = {
 | 
	
		
			
				|  |  | +        id : this.dialogForm.id,
 | 
	
		
			
				|  |  | +        logisticsCorpId : this.dialogForm.logisticsCorpId,
 | 
	
		
			
				|  |  | +        logisticsCorpName : this.dialogForm.logisticsCorpName,
 | 
	
		
			
				|  |  | +        shipType : this.dialogForm.shipType,
 | 
	
		
			
				|  |  | +        expressNo : this.dialogForm.expressNo
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      shipments(requestBody).then(res => {
 | 
	
		
			
				|  |  | +        console.log(res)
 | 
	
		
			
				|  |  | +        this.$message.success("发货成功");
 | 
	
		
			
				|  |  | +        this.dialogVisible = false;
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      //自定义列保存
 | 
	
		
			
				|  |  |      async saveColumnTwo(ref, option, optionBack, code) {
 | 
	
		
			
				|  |  |        /**
 |