caojunjie 2 лет назад
Родитель
Сommit
0293926dd5

+ 32 - 0
src/api/basicData/salesOrder.js

@@ -11,6 +11,17 @@ export const getList = (current, size, params) => {
     }
   })
 }
+export const getListTwo = (current, size, params) => {
+  return request({
+    url: '/api/blade-purchase-sales/partsMall/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
 export const getCorpsAll = () => {
   return request({
     url: '/api/blade-client/partsCorps/getCorpsAll',
@@ -66,6 +77,13 @@ export const getDetails = (data) => {
     params:data
   })
 }
+export const getDetailsTwo = (data) => {
+  return request({
+    url: '/api/blade-purchase-sales/webpage/detail',
+    method: 'get',
+    params:data
+  })
+}
 export function remove(data) {
   return request({
     url: '/api/blade-purchase-sales/orderitems/update',
@@ -122,6 +140,13 @@ export const getStoragelist = (data) => {
       params: data
   })
 }
+export const statusStatisticsApi = (data) => {
+  return request({
+      url: '/api/blade-purchase-sales/partsMall/statusStatisticsApi',
+      method: 'get',
+      params: data
+  })
+}
 export const offset = (data) => {
   return request({
       url: '/api/blade-purchase-sales/appParts/offset',
@@ -129,3 +154,10 @@ export const offset = (data) => {
       data: data
   })
 }
+export const delivery = (data) => {
+  return request({
+      url: '/api/blade-purchase-sales/partsMall/delivery',
+      method: 'post',
+      data: data
+  })
+}

+ 16 - 0
src/api/oceanShipping/maritimeExport/index.js

@@ -86,3 +86,19 @@ export function revokeBill(data) {
         data: data
     })
 }
+// 生成分票
+export function createLotTing(data) {
+    return request({
+        url: '/api/blade-box-tube/shippingbill/createLotTing',
+        method: 'post',
+        data: data
+    })
+}
+// 创建单据
+export function found(data) {
+    return request({
+        url: '/api/blade-box-tube/shippingbill/found',
+        method: 'get',
+        params:data
+    })
+}

+ 3 - 0
src/enums/column-name.js

@@ -1058,6 +1058,9 @@ const columnName = [{
   code: 254.1,
   name: '海运出口-箱型箱量'
 }, {
+  code: 254.11,
+  name: '海运出口-箱型箱量-分箱明细'
+}, {
   code: 254.2,
   name: '海运出口-配箱信息'
 }, {

+ 39 - 3
src/views/oceanShipping/maritimeExport/components/appendix.vue

@@ -3,7 +3,7 @@
     <trade-card title="附件管理">
       <c-upload
           basic
-          :data="shippingFileList"
+          :data="form.shippingFileList"
           :disabled="disabled"
           deleteUrl="/api/blade-box-tube/shippingfile/remove"
           :enumerationValue="254.4"
@@ -18,9 +18,45 @@ export default {
   name: "appendix",
   data(){
     return{
-      shippingFileList:[]
+      form:{
+        shippingFileList:[]
+      },
+      formCreate:false
     }
-  }
+  },
+  props: {
+    value: {
+      type: Object,
+      required: true,
+      default: () => {
+        return {};
+      }
+    }
+  },
+  watch: {
+    value: {
+      handler(val) {
+        if (this.formCreate) {
+          this.form = Object.assign(this.value, {});
+        } else {
+          this.form = Object.assign(this.value, val || {});
+        }
+      },
+      deep: true,
+      immediate: true
+    },
+    form: {
+      handler(val) {
+        if (this.formCreate) this.setVal();
+      },
+      deep: true
+    }
+  },
+  async created() {
+    this.$nextTick(() => {
+      this.formCreate = true;
+    })
+  },
 }
 </script>
 

+ 27 - 1
src/views/oceanShipping/maritimeExport/components/bookingInformation.vue

@@ -81,6 +81,8 @@
 </template>
 
 <script>
+import {tradingBox} from "@/api/oceanShipping/maritimeExport";
+
 export default {
   name: "bookingInformation",
   data() {
@@ -95,7 +97,12 @@ export default {
         column: [{
           label: '客户名称',
           span: 12,
-          prop: 'corpId'
+          prop: 'corpId',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
         }, {
           label: '客户电话',
           prop: 'telephone'
@@ -631,6 +638,25 @@ export default {
     setVal() {
       this.$emit("callBack", this.form);
     },
+    rowDelBox(row, index) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+            if (row.id) {
+              tradingBox(row.id).then(res => {
+                this.shippingBoxTypeList.splice(index, 1);
+                this.$message.success("操作成功!");
+              });
+            } else {
+              this.shippingBoxTypeList.splice(index, 1);
+              this.$message.success("操作成功!");
+            }
+          }
+      )
+      ;
+    },
     rowSave(form, done, loading) {
       done(form)
     },

+ 21 - 0
src/views/oceanShipping/maritimeExport/components/entrustmentInformation.vue

@@ -61,6 +61,8 @@
 </template>
 
 <script>
+import {tradingBox} from "@/api/oceanShipping/maritimeExport";
+
 export default {
   name: "entrustmentInformation",
   data() {
@@ -378,6 +380,25 @@ export default {
     setVal(){
       this.$emit("callBack", this.form);
     },
+    rowDelBox(row, index) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+            if (row.id) {
+              tradingBox(row.id).then(res => {
+                this.shippingBoxTypeList.splice(index, 1);
+                this.$message.success("操作成功!");
+              });
+            } else {
+              this.shippingBoxTypeList.splice(index, 1);
+              this.$message.success("操作成功!");
+            }
+          }
+      )
+      ;
+    },
     rowSave(form, done, loading) {
       done(form)
     },

+ 71 - 18
src/views/oceanShipping/maritimeExport/components/packingDetails.vue

@@ -1,20 +1,18 @@
 <template>
   <div>
     <trade-card title="箱型箱量">
-      <avue-crud :option="optionBox" v-model="formBox" ref="formBox" :data="shippingMatchBoxFollowList" @row-save="rowSave"
-                 @row-update="rowUpdate"
-                 @resetColumn="resetColumnTwo('formBox','optionBox','optionBoxBack',254.1)"
-                 @saveColumn="saveColumnTwo('formBox','optionBox','optionBoxBack',254.1)">>
-        <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-          <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
-                     @click="$refs.formBox.rowEdit(row,index)">编辑
-          </el-button>
-          <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
-                     @click="rowDelBox(row,index)">删除
-          </el-button>
-        </template>
+      <avue-crud
+          :option="optionBox"
+          v-model="formBox"
+          ref="formBox"
+          :data="form.shippingMatchBoxList"
+          @selection-change="selectionChange"
+          @row-save="rowSave"
+          @row-update="rowUpdate"
+          @resetColumn="resetColumnTwo('formBox','optionBox','optionBoxBack',254.11)"
+          @saveColumn="saveColumnTwo('formBox','optionBox','optionBoxBack',254.11)">
         <template slot="menuLeft">
-          <el-button type="primary" size="small">生成分票</el-button>
+          <el-button :disabled="selectionList.length <= 0" type="primary" size="small" @click="create">生成分票</el-button>
         </template>
       </avue-crud>
     </trade-card>
@@ -22,11 +20,15 @@
 </template>
 
 <script>
+import {
+  createLotTing
+} from "@/api/oceanShipping/maritimeExport/index.js";
 export default {
   name: "bookingInformation",
   data() {
     return {
-      formBox:{},
+      form: {},
+      formBox: {},
       shippingMatchBoxFollowList: [],
       optionBox: {},
       optionBoxBack: {
@@ -35,9 +37,10 @@ export default {
         addBtnText: "录入明细",
         refreshBtn: false,
         dialogDrag: true,
-        addBtn: true,
+        addBtn: false,
         span: 8,
         height: 600,
+        menu: false,
         selection: true,
         addRowBtn: false,
         cellBtn: false,
@@ -104,13 +107,64 @@ export default {
           prop: 'remarks',
           overHidden: true
         }]
+      },
+      formCreate: false,
+      selectionList:[]
+    }
+  },
+  props: {
+    value: {
+      type: Object,
+      required: true,
+      default: () => {
+        return {};
       }
     }
   },
+  watch: {
+    value: {
+      handler(val) {
+        if (this.formCreate) {
+          this.form = Object.assign(this.value, {});
+        } else {
+          this.form = Object.assign(this.value, val || {});
+        }
+      },
+      deep: true,
+      immediate: true
+    },
+    form: {
+      handler(val) {
+        if (this.formCreate) this.setVal();
+      },
+      deep: true
+    }
+  },
   async created() {
-    this.optionBox = await this.getColumnData(this.getColumnName(254.1), this.optionBoxBack);
+    this.$nextTick(() => {
+      this.formCreate = true;
+    })
+    this.optionBox = await this.getColumnData(this.getColumnName(254.11), this.optionBoxBack);
+    this.optionBox.selectable = (row,index)=>{
+      return Number(row.createStatus) === 0;
+    }
   },
-  methods:{
+  methods: {
+    setVal() {
+      this.$emit("callBack", this.form);
+    },
+    selectionChange(list){
+      this.selectionList = list
+    },
+    create(){
+      createLotTing({
+        id:this.form.id,
+        shippingMatchBoxFollowList:this.selectionList
+      }).then(res=>{
+        this.$message.success("生成成功")
+        this.$parent.refresh(this.form.id)
+      })
+    },
     rowSave(form, done, loading) {
       done(form)
     },
@@ -138,7 +192,6 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs[ref].$refs.dialogColumn.columnBox = false;
-        this.limit()
       }
     },
   }

+ 45 - 9
src/views/oceanShipping/maritimeExport/components/ticketDistribution.vue

@@ -1,10 +1,15 @@
 <template>
   <div>
     <trade-card title="分票信息">
-      <avue-crud :option="optionBox" v-model="formBox" ref="formBox" :data="shippingBillList" @row-save="rowSave"
-                 @row-update="rowUpdate"
-                 @resetColumn="resetColumnTwo('formBox','optionBox','optionBoxBack',254.5)"
-                 @saveColumn="saveColumnTwo('formBox','optionBox','optionBoxBack',254.5)">>
+      <avue-crud
+          :option="optionBox"
+          v-model="formBox"
+          ref="formBox"
+          :data="form.shippingBillList"
+          @row-save="rowSave"
+          @row-update="rowUpdate"
+          @resetColumn="resetColumnTwo('formBox','optionBox','optionBoxBack',254.5)"
+          @saveColumn="saveColumnTwo('formBox','optionBox','optionBoxBack',254.5)">>
         <template slot-scope="{type,size,row,index,disabled}" slot="menu">
           <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
                      @click="$refs.formBox.rowEdit(row,index)">查看
@@ -20,6 +25,8 @@ export default {
   name: "ticketDistribution",
   data() {
     return {
+      form: {},
+      formCreate: false,
       formBox: {},
       shippingBillList: [],
       optionBox: {},
@@ -37,7 +44,7 @@ export default {
         cellBtn: false,
         editBtn: false,
         delBtn: false,
-        menuWidth: 140,
+        menuWidth: 100,
         dialogTop: 25,
         dialogWidth: "80%",
         showSummary: true,
@@ -111,7 +118,7 @@ export default {
           prop: 'boxQuantity',
           width: 100,
           overHidden: true
-        },{
+        }, {
           label: '货描',
           prop: 'boxQuantity',
           width: 100,
@@ -120,7 +127,38 @@ export default {
       }
     }
   },
+  props: {
+    value: {
+      type: Object,
+      required: true,
+      default: () => {
+        return {};
+      }
+    }
+  },
+  watch: {
+    value: {
+      handler(val) {
+        if (this.formCreate) {
+          this.form = Object.assign(this.value, {});
+        } else {
+          this.form = Object.assign(this.value, val || {});
+        }
+      },
+      deep: true,
+      immediate: true
+    },
+    form: {
+      handler(val) {
+        if (this.formCreate) this.setVal();
+      },
+      deep: true
+    }
+  },
   async created() {
+    this.$nextTick(() => {
+      this.formCreate = true;
+    })
     this.optionBox = await this.getColumnData(this.getColumnName(254.5), this.optionBoxBack);
   },
   methods: {
@@ -151,13 +189,11 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs[ref].$refs.dialogColumn.columnBox = false;
-        this.limit()
       }
-    },
+    }
   }
 }
 </script>
 
 <style scoped>
-
 </style>

+ 49 - 36
src/views/oceanShipping/maritimeExport/detailsPage.vue

@@ -7,9 +7,9 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
-        <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"
-                   @click="confirmEditing">编辑
-        </el-button>
+<!--        <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"-->
+<!--                   @click="confirmEditing">编辑-->
+<!--        </el-button>-->
         <el-button
             class="el-button--small-yh"
             type="primary"
@@ -21,16 +21,16 @@
     <el-tabs style="height: 0;top: 84px" class="customer-head" type="border-card" v-model="activeName">
       <el-tab-pane label="委托信息" name="entrust"></el-tab-pane>
       <el-tab-pane label="订舱信息" name="booking"></el-tab-pane>
-      <el-tab-pane label="业务账单" name="business_bill"></el-tab-pane>
-      <el-tab-pane label="分单内容" name="split_content"></el-tab-pane>
-      <el-tab-pane label="分箱明细" name="packing_details"></el-tab-pane>
-      <el-tab-pane label="分票列表" name="ticket_distribution"></el-tab-pane>
-      <el-tab-pane label="附件" name="appendix"></el-tab-pane>
-      <el-tab-pane label="财务账单" name="fourth"></el-tab-pane>
-      <el-tab-pane label="提单管理" name="fourth"></el-tab-pane>
-      <el-tab-pane label="EDI" name="fourth"></el-tab-pane>
-      <el-tab-pane label="场站数据" name="fourth"></el-tab-pane>
-      <el-tab-pane label="危险品申报" name="fourth"></el-tab-pane>
+<!--      <el-tab-pane label="业务账单" name="business_bill"></el-tab-pane>-->
+<!--      <el-tab-pane label="分单内容" name="split_content"></el-tab-pane>-->
+<!--      <el-tab-pane label="分箱明细" name="packing_details"></el-tab-pane>-->
+<!--      <el-tab-pane label="分票列表" name="ticket_distribution"></el-tab-pane>-->
+<!--      <el-tab-pane label="附件" name="appendix"></el-tab-pane>-->
+<!--      <el-tab-pane label="财务账单" name="fourth"></el-tab-pane>-->
+<!--      <el-tab-pane label="提单管理" name="fourth"></el-tab-pane>-->
+<!--      <el-tab-pane label="EDI" name="fourth"></el-tab-pane>-->
+<!--      <el-tab-pane label="场站数据" name="fourth"></el-tab-pane>-->
+<!--      <el-tab-pane label="危险品申报" name="fourth"></el-tab-pane>-->
     </el-tabs>
     <div style="margin-top: 90px">
       <div v-if="activeName === 'entrust'">
@@ -46,13 +46,13 @@
         <split-content ref="split_content" v-model="form"></split-content>
       </div>
       <div v-if="activeName === 'packing_details'">
-        <packing-details></packing-details>
+        <packing-details ref="packing_details" v-model="form"></packing-details>
       </div>
       <div v-if="activeName === 'ticket_distribution'">
-        <ticket-distribution></ticket-distribution>
+        <ticket-distribution ref="ticket_distribution" v-model="form"></ticket-distribution>
       </div>
       <div v-if="activeName === 'appendix'">
-        <appendix></appendix>
+        <appendix ref="appendix" v-model="form"></appendix>
       </div>
     </div>
   </div>
@@ -61,7 +61,8 @@
 <script>
 import {
   detail,
-  submit
+  submit,
+  found
 } from "@/api/oceanShipping/maritimeExport/index.js";
 import entrustmentInformation from './components/entrustmentInformation.vue'
 import bookingInformation from './components/bookingInformation.vue'
@@ -301,6 +302,10 @@ export default {
       this.refresh(this.onLoad.id, true)
     } else if (this.onLoad.id) {
       this.refresh(this.onLoad.id, true)
+    }else {
+      found({billType:"HYCK"}).then(res=>{
+        this.form = res.data.data
+      })
     }
   },
   methods: {
@@ -322,24 +327,28 @@ export default {
     },
     //保存数据
     editCustomer() {
-      console.log(this.form.consignorId)
-      let form = {
-        ...this.form,
-        billType: "HYCK",
-        tradeType: "HY"
-      }
-      const loading = this.$loading({
-        lock: true,
-        text: '加载中',
-        spinner: 'el-icon-loading',
-        background: 'rgba(255,255,255,0.7)'
-      });
-      submit(form).then(res => {
-        this.$message.success("保存成功")
-        loading.close()
-        this.refresh(res.data.data.id)
-      }).catch(() => {
-        loading.close()
+      this.$refs[this.activeName].$refs["form"].validate((valid, done) => {
+        done()
+        if (valid) {
+          let form = {
+            ...this.form,
+            billType: "HYCK",
+            tradeType: "HY"
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          submit(form).then(res => {
+            this.$message.success("保存成功")
+            loading.close()
+            this.refresh(res.data.data.id)
+          }).catch(() => {
+            loading.close()
+          })
+        }
       })
       return
       this.$refs["form"].validate((valid, done) => {
@@ -424,7 +433,11 @@ export default {
   color: #000 !important;
 }
 
-::v-deep .el-tabs__item.is-active {
+::v-deep .el-tabs__item .is-active {
+  color: #409EFF !important;
+}
+
+::v-deep .el-form-item__label {
   color: #409EFF !important;
 }
 </style>

+ 2 - 2
src/views/salesOrder/detailsPage.vue

@@ -141,7 +141,7 @@
 <script>
 import {optionList} from "./js/optionList";
 import {
-  getDetails,
+  getDetailsTwo,
   submit,
   getCorpDetails,
   remove,
@@ -526,7 +526,7 @@ export default {
     },
     getDetail(id) {
       this.loadingBtn = true
-      getDetails({ id: id })
+      getDetailsTwo({ id: id })
         .then(res => {
           this.form = res.data.data;
           this.data = res.data.data.orderItemsList;

+ 113 - 24
src/views/salesOrder/index.vue

@@ -1,10 +1,17 @@
 <template>
   <div>
     <basic-container v-show="show" class="page-crad">
+      <div style="display:flex;">
+        <el-badge v-for="item of badgeList" :value="item.count" :max="99" class="item" type="danger">
+          <el-button :type="search.status == item.status?'primary':''" size="mini" @click="query(item.status)">
+            {{ item.dictionaryStatus }}
+          </el-button>
+        </el-badge>
+      </div>
       <avue-crud :key="key" ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
-        @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
-        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-        @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
+                 @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+                 @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+                 @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
         <template slot="menuLeft">
           <el-button type="primary" size="mini" @click.stop="newAdd()">新建销售单
           </el-button>
@@ -13,8 +20,7 @@
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot-scope="{ row, index }" slot="corpId">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.corpsName }}
-          </span>
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.corpsName }}</span>
         </template>
         <template slot="businesDateSearch">
           <el-date-picker v-model="search.businesDate" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
@@ -27,20 +33,20 @@
             <i class="tradingIcon icon-add" />
           </el-tooltip> -->
           <el-tooltip class="item" effect="dark" content="删除" placement="top">
-            <i class="tradingIcon icon-del" v-if="row.confirmStatus == 0" @click.stop="rowDel(row, index)" />
-          </el-tooltip>
-          <!-- <el-tooltip class="item" effect="dark" content="编辑" placement="top">
-            <i class="tradingIcon icon-edit" />
-          </el-tooltip>
-          <el-tooltip class="item" effect="dark" content="收款" placement="top">
-            <i class="tradingIcon icon-proceeds" />
+            <i class="tradingIcon icon-del" v-if="row.confirmStatus == 0" @click.stop="rowDel(row, index)"/>
           </el-tooltip>
+          <!--          <el-tooltip class="item" effect="dark" content="编辑" placement="top">-->
+          <!--            <i class="tradingIcon icon-edit" />-->
+          <!--          </el-tooltip>-->
+          <!--          <el-tooltip class="item" effect="dark" content="收款" placement="top">-->
+          <!--            <i class="tradingIcon icon-proceeds" />-->
+          <!--          </el-tooltip>-->
           <el-tooltip class="item" effect="dark" content="发货" placement="top">
-            <i class="tradingIcon icon-deliver" />
+            <i class="tradingIcon icon-deliver" v-if="row.status == 6" @click.stop="deliverGoods(row, index)"/>
           </el-tooltip>
-          <el-tooltip class="item" effect="dark" content="对账" placement="top">
-            <i class="tradingIcon icon-reconciliation" />
-          </el-tooltip> -->
+          <!--          <el-tooltip class="item" effect="dark" content="对账" placement="top">-->
+          <!--            <i class="tradingIcon icon-reconciliation" />-->
+          <!--          </el-tooltip>-->
           <!-- <el-button type="text" size="small" @click.stop="editOpen(row, 2)">
             查看
           </el-button>
@@ -50,26 +56,64 @@
         </template>
       </avue-crud>
     </basic-container>
-    <details-page v-if="!show" @goBack="goBack()" :detailData="detailData" />
+    <details-page v-if="!show" @goBack="goBack()" :detailData="detailData"/>
+    <el-dialog
+        title="发货"
+        :visible.sync="dialogVisible"
+        append-to-body
+        close-on-click-modal
+        close-on-press-escape
+        width="60%">
+      <div>
+        <el-form :model="form" label-position="right">
+          <el-col :span="12">
+            <el-form-item label="快递公司:" label-width="100px">
+              <el-input v-model="form.courierCorporation" placeholder="请输入快递公司" size="small" style="width: 100%;"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="快递单号:" label-width="100px">
+              <el-input v-model="form.courierNumber" placeholder="请输入快递单号" size="small" style="width: 100%;"></el-input>
+            </el-form-item>
+          </el-col>
+        </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 detailsPage from "./detailsPage";
-import { option } from "./js/optionList";
-import { getList, getCorpsAll, gainUser, getCorpType, orderRemove } from "@/api/basicData/salesOrder";
+import {option} from "./js/optionList";
+import {
+  getListTwo,
+  getCorpsAll,
+  gainUser,
+  getCorpType,
+  orderRemove,
+  statusStatisticsApi,
+  delivery
+} from "@/api/basicData/salesOrder";
+
 export default {
   name: "index",
   data() {
     return {
       src: '',
+      form: {},
+      dialogVisible: false,
+      badgeList: [],
       show: true,
       loading: false,
       search: {},
       detailData: {},
       dataList: [],
       selectionList: [],
-      key:0,
+      key: 0,
       page: {
         pageSize: 20,
         currentPage: 1,
@@ -183,11 +227,27 @@ export default {
     }
   },
   methods: {
+    confirmShipment(){
+      delivery({
+        id:this.form.id,
+        courierNumber:this.form.courierNumber,
+        courierCorporation:this.form.courierCorporation
+      }).then(res=>{
+        this.$message.success("发货成功")
+        this.dialogVisible = false
+        this.onLoad(this.page)
+      })
+    },
+    query(status) {
+      this.search.status = status
+      this.page.currentPage = 1;
+      this.onLoad(this.page)
+    },
     getAllWorkDicts() {
       gainUser().then(res => {
         this.findObject(this.option.column, "createUser").dicData = res.data.data;
       })
-      getCorpType({ corpType: 'KH' }).then(res => {
+      getCorpType({corpType: 'KH'}).then(res => {
         this.findObject(this.option.column, "corpType").dicData = res.data.data
       });
       this.$refs.crud.init();
@@ -217,6 +277,9 @@ export default {
       this.$store.commit("IN_PJXS_STATUS");
     },
     onLoad(page, params = {}) {
+      statusStatisticsApi().then(res => {
+        this.badgeList = res.data.data;
+      })
       let data = this.deepClone(Object.assign(params, this.search));
       data.billType = 'XS';
       data.tradeType = 'YPJ';
@@ -226,7 +289,7 @@ export default {
       }
       delete data.businesDate
       this.loading = true;
-      getList(
+      getListTwo(
         page.currentPage,
         page.pageSize,
         data
@@ -271,10 +334,14 @@ export default {
         });
       });
     },
+    deliverGoods(row, index) {
+      this.form = row
+      this.dialogVisible = true
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
-        this.getColumnName(211),
-        this.option
+          this.getColumnName(211),
+          this.option
       );
       if (inSave) {
         this.$nextTick(() => {
@@ -319,6 +386,15 @@ export default {
   height: 94.2vh;
 }
 
+::v-deep .el-badge__content.is-fixed {
+  z-index: 10;
+}
+
+.item {
+  margin-right: 20px;
+  margin-bottom: 10px;
+}
+
 .stat-td {
   text-align: center;
   position: relative;
@@ -349,4 +425,17 @@ export default {
     margin-bottom: 0px;
   }
 }
+::v-deep .el-form-item__content{
+  margin-left: 90px;
+}
+::v-deep .el-form-item__label {
+  //text-align: right;
+  //vertical-align: middle;
+  //float: left;
+  //font-size: 14px;
+  //color: #606266;
+  //line-height: 40px;
+  padding: 0 4px 0 0;
+  //box-sizing: border-box;
+}
 </style>