فهرست منبع

提交箱管,并修改Avue附件组件问题

caojunjie 3 سال پیش
والد
کامیت
4e8d263175

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
public/cdn/avue/2.8.18/avue.min.js


+ 109 - 0
src/api/boxManagement/boxRepair/index.js

@@ -0,0 +1,109 @@
+import request from '@/router/axios';
+//查询列表
+export const getList = (params) => {
+    return request({
+        url: '/api/blade-box-tube/repair/list',
+        method: 'get',
+        params: params
+    })
+}
+//删除
+export const remove = (ids) => {
+    return request({
+        url: '/api/blade-box-tube/repair/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
+}
+//查询轨迹
+export const archivestrajectory = (params) => {
+    return request({
+        url: '/api/blade-box-tube/archivestrajectory/list',
+        method: 'get',
+        params: params
+    })
+}
+
+//查询明细
+export const detail = (params) => {
+    return request({
+        url: '/api/blade-box-tube/transport/detail',
+        method: 'get',
+        params: params
+    })
+}
+//新增修改
+export function submit(data){
+    return request({
+        url:'/api/blade-box-tube/transport/submit',
+        method:'post',
+        data
+    })
+}
+//修改轨迹
+export function update(data){
+    return request({
+        url:'/api/blade-box-tube/archivestrajectory/update',
+        method:'post',
+        data
+    })
+}
+
+//删除明细
+export const tradingBoxItem = (ids) => {
+    return request({
+        url: '/api/blade-box-tube/transportItem/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
+}
+//删除轨迹
+export const tradingBoxGJ = (ids) => {
+    return request({
+        url: '/api/blade-box-tube/archivestrajectory/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
+}
+
+//删除费用明细
+export const tradingBoxFees = (ids) => {
+    return request({
+        url: '/api/blade-box-tube/transportItemFees/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
+}
+
+// 请核
+export function pleaseCheck(data) {
+    return request({
+        url: '/api/blade-box-tube/transport/checkTransport',
+        method: 'post',
+        data: data
+    })
+}
+// 撤销
+export function repealCancel(data) {
+    return request({
+        url: '/api/blade-box-tube/transport/withdrawTransport',
+        method: 'post',
+        data: data
+    })
+}
+// 更改状态
+export function statusUpdate(data) {
+    return request({
+        url: '/api/blade-box-tube/transport/statusUpdate',
+        method: 'get',
+        params:data
+    })
+}

+ 10 - 26
src/api/boxManagement/exportShipment/index.js

@@ -29,7 +29,7 @@ export const remove = (ids) => {
 //查询明细
 export const detail = (params) => {
     return request({
-        url: '/api/blade-box-tube/transport/detail',
+        url: '/api/blade-box-tube/repair/detail',
         method: 'get',
         params: params
     })
@@ -37,15 +37,7 @@ export const detail = (params) => {
 //新增修改
 export function submit(data){
     return request({
-        url:'/api/blade-box-tube/transport/submit',
-        method:'post',
-        data
-    })
-}
-//修改轨迹
-export function update(data){
-    return request({
-        url:'/api/blade-box-tube/archivestrajectory/update',
+        url:'/api/blade-box-tube/repair/submit',
         method:'post',
         data
     })
@@ -54,28 +46,28 @@ export function update(data){
 //删除明细
 export const tradingBoxItem = (ids) => {
     return request({
-        url: '/api/blade-box-tube/transportItem/remove',
+        url: '/api/blade-box-tube/repairItem/remove',
         method: 'post',
         params: {
             ids,
         }
     })
 }
-//删除轨迹
-export const tradingBoxGJ = (ids) => {
+
+//删除图片
+export const tradingBoxFiles = (ids) => {
     return request({
-        url: '/api/blade-box-tube/archivestrajectory/remove',
+        url: '/api/blade-box-tube/files/remove',
         method: 'post',
         params: {
             ids,
         }
     })
 }
-
 //删除费用明细
 export const tradingBoxFees = (ids) => {
     return request({
-        url: '/api/blade-box-tube/transportItemFees/remove',
+        url: '/api/blade-box-tube/repairFees/remove',
         method: 'post',
         params: {
             ids,
@@ -86,7 +78,7 @@ export const tradingBoxFees = (ids) => {
 // 请核
 export function pleaseCheck(data) {
     return request({
-        url: '/api/blade-box-tube/transport/checkTransport',
+        url: '/api/blade-box-tube/repair/checkRepair',
         method: 'post',
         data: data
     })
@@ -94,16 +86,8 @@ export function pleaseCheck(data) {
 // 撤销
 export function repealCancel(data) {
     return request({
-        url: '/api/blade-box-tube/transport/withdrawTransport',
+        url: '/api/blade-box-tube/repair/withdrawRepair',
         method: 'post',
         data: data
     })
 }
-// 更改状态
-export function statusUpdate(data) {
-    return request({
-        url: '/api/blade-box-tube/transport/statusUpdate',
-        method: 'get',
-        params:data
-    })
-}

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

@@ -1012,6 +1012,30 @@ const columnName = [{
 },{
   code: 241,
   name: '箱轨迹'
+},{
+  code: 242,
+  name: '箱管理-修箱'
+},{
+  code: 242.1,
+  name: '箱管理-修箱-明细'
+},{
+  code: 242.2,
+  name: '箱管理-修箱-费用'
+},{
+  code: 242.3,
+  name: '箱管理-修箱-附件'
+},{
+  code: 243,
+  name: '箱管理-修箱'
+},{
+  code: 243.1,
+  name: '箱管理-修箱-明细'
+},{
+  code: 243.2,
+  name: '箱管理-修箱-费用'
+},{
+  code: 243.3,
+  name: '箱管理-修箱-附件'
 }
 ]
 export const getColumnName = (key) => {

+ 2 - 0
src/views/approveData/index.vue

@@ -32,6 +32,8 @@
         <span v-else-if="scope.row.checkType == 'SELL'">卖箱审核</span>
         <span v-else-if="scope.row.checkType == 'CKZY'">出口装运</span>
         <span v-else-if="scope.row.checkType == 'JKFC'">进口返程</span>
+        <span v-else-if="scope.row.checkType == 'REPAIR'">修箱</span>
+        <span v-else-if="scope.row.checkType == 'WASH'">洗箱</span>
       </template>
       <template slot="menuLeft">
         <el-button size="small" type="success" :disabled="selectionList.length == 0" @click.stop="batchCheck">批量审批

+ 706 - 0
src/views/boxManagement/boxRepair/detailsPage.vue

@@ -0,0 +1,706 @@
+<template>
+  <div>
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList(0)">返回列表
+        </el-button>
+        <el-button v-if="detailData.id" type="danger" style="border: none;background: none;color: red"
+                   icon="el-icon-arrow-left"
+                   @click="backToList(1)">返回审核列表
+        </el-button>
+      </div>
+      <div class="add-customer-btn">
+        <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small"
+                   :disabled="form.status>0"
+                   @click="confirmEdit" v-if="optionForm.disabled === true">编辑
+        </el-button>
+        <el-dropdown style="margin-right: 10px">
+          <el-button type="primary" size="small">
+            审核处理<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item @click.native="pleaseCheck" :disabled="form.status>0">请核数据</el-dropdown-item>
+            <el-dropdown-item @click.native="checkScheduleDialog = true,checkId = form.id">审核进度</el-dropdown-item>
+            <el-dropdown-item @click.native="repealCancel" :disabled="form.status === 0 || !form.status"
+                              v-if="!detailData.id">撤销请核
+            </el-dropdown-item>
+            <!--            <el-dropdown-item @click.native="changeApproveOpen">特殊审批</el-dropdown-item>-->
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button class="el-button--small-yh" type="primary" size="small" :disabled="form.status>0"
+                   @click="editCustomer">保存数据
+        </el-button>
+      </div>
+    </div>
+    <trade-card title="基础资料" style="margin-top: 50px">
+      <avue-form :option="optionForm" v-model="form" ref="form">
+        <template slot="companyId" slot-scope="scope">
+          <crop-select v-model="form.companyId" @getCorpData="(row)=>{getGSData(row,['form','company'])}"
+                       :disabled="scope.disabled"
+                       corpType="GS"/>
+        </template>
+        <template slot="addressId" slot-scope="scope">
+          <port-info :disabled="scope.disabled" v-model="form.addressId" type="id"
+                     @balabalaTow="(val)=>{balabala(val,['form','address'])}"/>
+        </template>
+        <template slot="shippingCompany" slot-scope="scope">
+          <crop-select v-model="form.shippingCompanyId"
+                       @getCorpData="(row)=>{getGSData(row,['form','shippingCompany'])}" :disabled="scope.disabled"
+                       corpType="GS"/>
+        </template>
+        <template slot="departureHarbor" slot-scope="scope">
+          <port-info :disabled="scope.disabled" v-model="form.departureHarborId" type="id"
+                     @balabalaTow="(val)=>{balabala(val,['form','departureHarbor'])}"/>
+        </template>
+        <template slot="objectiveHarbor" slot-scope="scope">
+          <port-info :disabled="scope.disabled" v-model="form.objectiveHarborId" type="id"
+                     @balabalaTow="(val)=>{balabala(val,['form','objectiveHarbor'])}"/>
+        </template>
+      </avue-form>
+    </trade-card>
+    <trade-card title="箱信息">
+      <avue-crud
+          :option="option"
+          :data="dataList"
+          v-model="formTwo"
+          ref="crud"
+          :key="key"
+          :upload-delete="uploadDelete"
+          @row-save="rowSave"
+          @row-update="rowUpdate"
+          @selection-change="selectionChange"
+          @resetColumn="resetColumnTwo('crud','option','optionBack',242.1)"
+          @saveColumn="saveColumnTwo('crud','option','optionBack',242.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.crud.rowEdit(row,index)">编辑
+          </el-button>
+          <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
+                     @click="rowDel(row,index,'MX')">删除
+          </el-button>
+        </template>
+        <template slot="addressForm" slot-scope="scope">
+          <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled"
+                     @balabalaTow="(val)=>{balabala(val,['formTwo','address'])}"/>
+        </template>
+        <!--        <template slot="boxMakingCompanyIdForm" slot-scope="scope">-->
+        <!--          <crop-select v-model="formTwo.boxMakingCompanyId" :disabled="scope.disabled" :refresh="false"-->
+        <!--                       @getCorpData="(row)=>{getGSData(row,['formTwo','boxMakingCompany'])}" corpType="GS"/>-->
+        <!--        </template>-->
+      </avue-crud>
+    </trade-card>
+    <!--    费用信息组件-->
+    <box-cost :listData="dataListTwo" :codeValue="242.2" :tabShow="3" activeName="second" ref="boxCost"
+              url="/api/blade-box-tube/files/remove" @resetTrigger="resetTrigger"></box-cost>
+    <trade-card title="附件明细">
+      <c-upload
+          basic
+          :data="tradingBoxFilesList"
+          :disabled="disabled"
+          deleteUrl="/api/blade-box-tube/transportFiles/remove"
+          :enumerationValue="242.3"
+          display
+      />
+    </trade-card>
+    <el-dialog
+        append-to-body
+        title="审批进度"
+        class="el-dialogDeep"
+        :visible.sync="checkScheduleDialog"
+        width="40%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        v-dialog-drag
+    >
+      <check-schedule
+          :checkId="checkId"
+          :batchNo="batchNo"
+          @choceScheduleFun="choceScheduleFun"
+      ></check-schedule>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  detail,
+  submit,
+  tradingBoxItem,
+  tradingBoxFees,
+  pleaseCheck,
+  repealCancel,
+  tradingBoxFiles
+} from "@/api/boxManagement/exportShipment/index.js";
+
+import checkSchedule from "@/components/check/checkSchedule";
+import {selectByName} from "@/api/boxManagement";
+
+export default {
+  name: "detailsPage",
+  props: {
+    onLoad: Object,
+    detailData: Object
+  },
+  components: {checkSchedule},
+  data() {
+    return {
+      key: 0,
+      checkScheduleDialog: false,
+      checkId: '',
+      batchNo: '',
+      breakConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        clearable: true,
+        placeholder: "请点击右边按钮选择",
+        dicData: []
+      },
+      form: {},
+      formTwo: {},
+      formSearch: {},
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        column: [{
+          label: '系统号',
+          prop: 'sysNo',
+          disabled: true
+        }, {
+          label: '客户',
+          prop: 'companyId',
+          width: 100,
+          search: true,
+          overHidden: true,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '地点',
+          prop: 'addressId'
+        }, {
+          label: '业务日期',
+          prop: 'newDate',
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: '备注',
+          prop: 'remarks',
+          type: 'textarea',
+          minRows: 3,
+          span: 24,
+        }]
+      },
+      option: {},
+      optionBack: {
+        align: 'center',
+        index: true,
+        selection: false,
+        addBtnText: "录入明细",
+        refreshBtn: false,
+        addBtn: true,
+        span: 8,
+        addRowBtn: false,
+        cellBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: 200,
+        dialogTop: 25,
+        dialogWidth: "80%",
+        column: [{
+          label: '箱号',
+          prop: 'code',
+          overHidden: true,
+          remote: true,
+          filterable: true,
+          type: "select",
+          dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code"
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '位置',
+          prop: 'position',
+          overHidden: true,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '照片',
+          prop: 'itemFilesList',
+          overHidden: true,
+          type: 'upload',
+          span: 24,
+          listType: 'picture-card',
+          tip: '只能上传jpg/png文件,且不超过500kb',
+          propsHttp: {
+            url: 'link',
+            name: 'originalName',
+            res: 'data'
+          },
+          action: '/api/blade-resource/oss/endpoint/put-file'
+        }, {
+          label: '备注',
+          prop: 'remarks',
+          overHidden: true,
+          type: 'textarea',
+          minRows: 3,
+          span: 24,
+          width: 200
+        }]
+      },
+      dataList: [],
+      dataListTwo: [],
+      tradingBoxFilesList: [],
+      selectionList: [],
+      disabled: false,
+      costData: {}
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(242.1), this.optionBack);
+    this.optionTrack = await this.getColumnData(this.getColumnName(242.4), this.optionTrackBack);
+    this.option.selectable = (row, index) => {
+      return row.id;
+    }
+    selectByName("租金").then(res => {
+      this.costData = res.data.data
+    })
+    if (this.onLoad.id && this.detailData.id) {
+      this.refresh(this.onLoad.id, true)
+    } else if (this.onLoad.id) {
+      this.refresh(this.onLoad.id, true)
+    }
+    this.key++
+  },
+  methods: {
+    confirmEdit() {
+      if (this.form.status > 0) {
+        //基础资料
+        this.$set(this.optionForm, "disabled", true)
+        //箱信息
+        this.$set(this.option, "disabled", true)
+        this.$set(this.option, "addBtn", false)
+        this.$set(this.option, "menu", false)
+        //费用信息
+        this.$set(this.$refs.boxCost.option, "disabled", true)
+        this.$set(this.$refs.boxCost.option, "addBtn", false)
+        this.$set(this.$refs.boxCost.option, "menu", false)
+        //附件和顶部按钮
+        this.disabled = true
+      } else {
+        //基础资料
+        this.$set(this.optionForm, "disabled", false)
+        //箱信息
+        this.$set(this.option, "disabled", false)
+        this.$set(this.option, "addBtn", true)
+        this.$set(this.option, "menu", true)
+        //费用信息
+        this.$set(this.$refs.boxCost.option, "disabled", false)
+        this.$set(this.$refs.boxCost.option, "addBtn", true)
+        this.$set(this.$refs.boxCost.option, "menu", true)
+        //附件和顶部按钮
+        this.disabled = false
+      }
+    },
+    selectionChange(list) {
+      this.selectionList = list
+    },
+    track(row) {
+      // this.dataTrackList = row
+      this.formSearch = row
+      this.boxTrack = true
+    },
+    // 明细删除
+    rowDel(row, index, type) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+            if (row.id) {
+              tradingBoxItem(row.id).then(res => {
+                if (res.data.success) {
+                  this.$message.success("操作成功!");
+                  this.dataList.splice(index, 1);
+                  if (this.dataListTwo.length > 0) {
+                    for (let item in this.dataListTwo) {
+                      if (this.dataListTwo[item].code == row.code) {
+                        if (this.dataListTwo[item].autoGenerate == 1) {
+                          if (this.dataListTwo[item].id) {
+                            tradingBoxFees(this.dataListTwo[item].id).then(res => {
+                              if (res.data.success) {
+                                this.dataListTwo.splice(index, 1);
+                              }
+                            });
+                          } else {
+                            this.dataListTwo.splice(Number(item), 1);
+                          }
+                        }
+                      }
+                    }
+                  }
+                }
+              });
+            } else {
+              this.dataList.splice(index, 1);
+              this.$message.success("操作成功!");
+              if (this.dataListTwo.length > 0) {
+                for (let item in this.dataListTwo) {
+                  if (this.dataListTwo[item].code === row.code) {
+                    if (this.dataListTwo[item].autoGenerate == 1) {
+                      this.dataListTwo.splice(Number(item), 1);
+                    }
+                  }
+                }
+              }
+            }
+          }
+      )
+      ;
+    },
+    balabala(val, type) {
+      if (val === null) {
+        this[type[0]][type[1]] = ''
+      } else {
+        this[type[0]][type[1]] = val.name
+      }
+    },
+    //撤销
+    repealCancel() {
+      this.$confirm("您确定撤回此次申请吗?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        const data = {
+          id: this.form.id,
+          pageLabel: "出库装运",
+          checkFlag: 1,
+        }
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中',
+          spinner: 'el-icon-loading',
+          background: 'rgba(255,255,255,0.7)'
+        });
+        repealCancel(data).then(res => {
+          loading.close();
+          this.$message.success('撤回成功')
+          this.refresh(this.form.id)
+        })
+      })
+    },
+    // 请核
+    pleaseCheck() {
+      if (this.dataList.length === 0) {
+        return this.$message.error("箱信息不能为空")
+      }
+      if (this.$refs.boxCost.dataList.length === 0) {
+        return this.$message.error("费用信息不能为空")
+      }else {
+        for (let item of this.$refs.boxCost.dataList){
+          if (!item.id){
+            return this.$message.error("费用信息未保存")
+          }
+        }
+      }
+      this.$confirm("您确定提交请核申请吗?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.$refs["form"].validate((valid, done) => {
+          done()
+          if (valid) {
+            let data = {
+              ...this.form,
+              repairItemList: this.dataList,
+              repairFeesList: this.dataListTwo,
+              filesList: this.tradingBoxFilesList,
+              billType: "REPAIR",
+              checkFlag: 1
+            }
+            const loading = this.$loading({
+              lock: true,
+              text: '加载中',
+              spinner: 'el-icon-loading',
+              background: 'rgba(255,255,255,0.7)'
+            });
+            submit(data).then(res => {
+              const data = {
+                id: res.data.data.id,
+                url: '/boxManagement/exportShipment/index',
+                pageStatus: "this.$store.getters.domSaleStatus",
+                pageLabel: "出口装运",
+                checkFlag: 1,
+              }
+              pleaseCheck({
+                ...data,
+                billType: "REPAIR"
+              }).then(rest => {
+                loading.close();
+                this.$message.success('请核成功')
+                this.refresh(res.data.data.id)
+              }).catch(() => {
+                loading.close();
+              })
+            }).catch(() => {
+              loading.close();
+            })
+          }
+        });
+      })
+    },
+    //审核关闭
+    choceScheduleFun() {
+      this.checkScheduleDialog = false
+    },
+    refresh(id, type) {
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      detail({id: id}).then(res => {
+        this.form = res.data.data
+        this.dataList = res.data.data.repairItemList
+        this.dataListTwo = res.data.data.repairFeesList
+        this.tradingBoxFilesList = res.data.data.filesList
+        delete this.form.repairItemList
+        delete this.form.repairFeesList
+        delete this.form.filesList
+        loading.close();
+        if (type) {
+          //基础资料
+          this.$set(this.optionForm, "disabled", true)
+          //箱信息
+          this.$set(this.option, "disabled", true)
+          this.$set(this.option, "addBtn", false)
+          this.$set(this.option, "menu", false)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option, "menu", false)
+          //附件和顶部按钮
+          this.disabled = true
+        } else {
+          if (this.form.status > 0) {
+            //基础资料
+            this.$set(this.optionForm, "disabled", true)
+            //箱信息
+            this.$set(this.option, "disabled", true)
+            this.$set(this.option, "addBtn", false)
+            this.$set(this.option, "menu", false)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", true)
+            this.$set(this.$refs.boxCost.option, "addBtn", false)
+            this.$set(this.$refs.boxCost.option, "menu", false)
+            //附件和顶部按钮
+            this.disabled = true
+          } else {
+            //基础资料
+            this.$set(this.optionForm, "disabled", false)
+            //箱信息
+            this.$set(this.option, "disabled", false)
+            this.$set(this.option, "addBtn", true)
+            this.$set(this.option, "menu", true)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", false)
+            this.$set(this.$refs.boxCost.option, "addBtn", true)
+            this.$set(this.$refs.boxCost.option, "menu", true)
+            //附件和顶部按钮
+            this.disabled = false
+          }
+        }
+      })
+    },
+    //新增修改
+    editCustomer() {
+      this.$refs["form"].validate((valid, done) => {
+        done()
+        if (valid) {
+          let data = {
+            ...this.form,
+            repairItemList: this.dataList,
+            repairFeesList: this.dataListTwo,
+            filesList: this.tradingBoxFilesList,
+            billType: "REPAIR"
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          submit(data).then(res => {
+            if (this.form.id) {
+              this.$message.success("修改成功")
+            } else {
+              this.$message.success("新增成功")
+            }
+            loading.close();
+            this.refresh(res.data.data.id)
+          }).catch(() => {
+            loading.close();
+          })
+        }
+      });
+    },
+    //删除图片
+    uploadDelete(file, column) {
+      return new Promise((resolve, reject) => {
+        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          if (this.formTwo.itemFilesList[file.uid].id) {
+            tradingBoxFiles(this.formTwo.itemFilesList[file.uid].id).then(res => {
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              });
+              resolve();
+            })
+          } else {
+            resolve()
+          }
+        }).catch(()=>{
+          reject();
+          this.$message({
+            type: "info",
+            message: "已取消删除"
+          });
+        })
+      })
+    },
+    rowSave(form, done, loading) {
+      let result = this.dataList.some((item) => {
+        if (item.code == form.code) {
+          return true
+        }
+      })
+      if (result === true) {
+        this.$message.error("已存在此箱号");
+        return loading();
+      }
+      done(form)
+    },
+    rowUpdate(form, index, done, loading) {
+      form.boxType = form.$boxTypeId
+      done(form)
+    },
+    getGSData(row, type) {
+      this[type[0]][type[1]] = row.cname
+    },
+    backToList(type) {
+      if (type == 0) {
+        if (this.detailData.id) {
+          this.$router.push({
+            path: '/boxManagement/exportShipment/index'
+          });
+        }
+        this.$emit("backToList", type);
+      } else if (type == 1) {
+        this.$router.push({
+          path: '/approveData/index'
+        });
+        this.$emit("backToList", type);
+      }
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    resetTrigger() {
+      if (this.optionForm.disabled == true) {
+        if (this.form.status > 0) {
+          //基础资料
+          this.$set(this.optionForm, "disabled", true)
+          //箱信息
+          this.$set(this.option, "disabled", true)
+          this.$set(this.option, "addBtn", false)
+          this.$set(this.option, "menu", false)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option, "menu", false)
+          //附件和顶部按钮
+          this.disabled = true
+        } else {
+          //基础资料
+          this.$set(this.optionForm, "disabled", false)
+          //箱信息
+          this.$set(this.option, "disabled", false)
+          this.$set(this.option, "addBtn", true)
+          this.$set(this.option, "menu", true)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", false)
+          this.$set(this.$refs.boxCost.option, "addBtn", true)
+          this.$set(this.$refs.boxCost.option, "menu", true)
+          //附件和顶部按钮
+          this.disabled = false
+        }
+      } else {
+        //基础资料
+        this.$set(this.optionForm, "disabled", false)
+        //箱信息
+        this.$set(this.option, "disabled", false)
+        this.$set(this.option, "addBtn", true)
+        this.$set(this.option, "menu", true)
+        //费用信息
+        this.$set(this.$refs.boxCost.option, "disabled", false)
+        this.$set(this.$refs.boxCost.option, "addBtn", true)
+        this.$set(this.$refs.boxCost.option, "menu", true)
+        //附件和顶部按钮
+        this.disabled = false
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.resetTrigger()
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+::v-deep .el-form-item {
+  margin-bottom: 8px;
+}
+</style>

+ 224 - 0
src/views/boxManagement/boxRepair/index.vue

@@ -0,0 +1,224 @@
+<template>
+  <div>
+    <basic-container v-show="!detailsOpen">
+      <avue-crud
+          :option="option"
+          :search.sync="search"
+          v-model="form"
+          :table-loading="loading"
+          :data="dataList"
+          ref="crud"
+          @on-load="onLoad"
+          @search-change="searchChange"
+          @row-del="rowDel"
+          @refresh-change="refreshChange"
+          @resetColumn="resetColumnTwo('crud','option','optionList',242)"
+          @saveColumn="saveColumnTwo('crud','option','optionList',242)"
+          :page.sync="page">
+        <template slot="addressSearch">
+          <port-info v-model="search.addressId" type="id"/>
+        </template>
+        <template slot="companySearch" slot-scope="scope">
+          <crop-select v-model="search.companyId" corpType="GS"/>
+        </template>
+        <template slot-scope="{type,size,row,$index}" slot="menu">
+          <el-button icon="el-icon-view" :size="size" :type="type" @click="check(row)">查看</el-button>
+          <el-button icon="el-icon-delete" :size="size" v-if="row.status == 0" :type="type"
+                     @click="$refs.crud.rowDel(row,$index)">删除
+          </el-button>
+        </template>
+        <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">创建单据</el-button>
+          <el-button class="el-icon-document-copy" type="success" size="small">复制单据</el-button>
+          <el-button class="el-icon-download" type="warning" size="small">导出</el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detailsPage v-if="detailsOpen" :onLoad="form" @backToList="backToList" :detailData="detailData"></detailsPage>
+  </div>
+</template>
+
+<script>
+import {getList, remove} from "@/api/boxManagement/boxRepair/index.js";
+import detailsPage from "./detailsPage"
+
+export default {
+  name: "index",
+  components: {
+    detailsPage
+  },
+  data() {
+    return {
+      detailsOpen: false,
+      loading: false,
+      search: {},
+      detailData: {},
+      form: {},
+      dataList: [],
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      optionList: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        height: "auto",
+        searchMenuPosition: "right",
+        align: "center",
+        menuWidth: 140,
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        dialogWidth: "70%",
+        column: [{
+          label: '系统号',
+          prop: 'sysNo',
+          overHidden: true
+        }, {
+          label: '客户',
+          prop: 'company',
+          search: true,
+          overHidden: true
+        }, {
+          label: '地点',
+          prop: 'address',
+          search: true,
+          overHidden: true
+        }, {
+          label: '业务日期',
+          prop: 'newDate',
+          searchProp: 'newDateList',
+          search: true,
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: '备注',
+          prop: 'remarks',
+          overHidden: true
+        }]
+      }
+    }
+  },
+  activated() {
+    if (this.$route.query.check) {
+      this.detailsOpen = false
+      this.detailData = {
+        id: this.$route.query.check.billId,
+        check: this.$route.query.check,
+      };
+      this.form = {
+        id: this.$route.query.check.billId
+      }
+      this.detailsOpen = true
+      this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(242), this.optionList);
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0) {
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  methods: {
+    check(row) {
+      this.form = row
+      this.detailsOpen = true
+    },
+    backToList(type) {
+      this.form = {}
+      this.detailsOpen = false
+      if (type === 0) {
+        this.detailData = {}
+      }
+      this.onLoad(this.page, this.search)
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search)
+    },
+    rowDel(form, index) {
+      this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        remove(form.id).then(res => {
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+        })
+      }).catch(() => {
+      });
+    },
+    searchChange(params, done) {
+      done();
+      this.onLoad(this.page, params)
+    },
+    onLoad(page, params = {}) {
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+        billType: "REPAIR",
+        ...Object.assign(params, this.search)
+      }
+      this.loading = true
+      getList(params).then(res => {
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+
+//自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+//自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 706 - 0
src/views/boxManagement/boxWashing/detailsPage.vue

@@ -0,0 +1,706 @@
+<template>
+  <div>
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList(0)">返回列表
+        </el-button>
+        <el-button v-if="detailData.id" type="danger" style="border: none;background: none;color: red"
+                   icon="el-icon-arrow-left"
+                   @click="backToList(1)">返回审核列表
+        </el-button>
+      </div>
+      <div class="add-customer-btn">
+        <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small"
+                   :disabled="form.status>0"
+                   @click="confirmEdit" v-if="optionForm.disabled === true">编辑
+        </el-button>
+        <el-dropdown style="margin-right: 10px">
+          <el-button type="primary" size="small">
+            审核处理<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item @click.native="pleaseCheck" :disabled="form.status>0">请核数据</el-dropdown-item>
+            <el-dropdown-item @click.native="checkScheduleDialog = true,checkId = form.id">审核进度</el-dropdown-item>
+            <el-dropdown-item @click.native="repealCancel" :disabled="form.status === 0 || !form.status"
+                              v-if="!detailData.id">撤销请核
+            </el-dropdown-item>
+            <!--            <el-dropdown-item @click.native="changeApproveOpen">特殊审批</el-dropdown-item>-->
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button class="el-button--small-yh" type="primary" size="small" :disabled="form.status>0"
+                   @click="editCustomer">保存数据
+        </el-button>
+      </div>
+    </div>
+    <trade-card title="基础资料" style="margin-top: 50px">
+      <avue-form :option="optionForm" v-model="form" ref="form">
+        <template slot="companyId" slot-scope="scope">
+          <crop-select v-model="form.companyId" @getCorpData="(row)=>{getGSData(row,['form','company'])}"
+                       :disabled="scope.disabled"
+                       corpType="GS"/>
+        </template>
+        <template slot="addressId" slot-scope="scope">
+          <port-info :disabled="scope.disabled" v-model="form.addressId" type="id"
+                     @balabalaTow="(val)=>{balabala(val,['form','address'])}"/>
+        </template>
+        <template slot="shippingCompany" slot-scope="scope">
+          <crop-select v-model="form.shippingCompanyId"
+                       @getCorpData="(row)=>{getGSData(row,['form','shippingCompany'])}" :disabled="scope.disabled"
+                       corpType="GS"/>
+        </template>
+        <template slot="departureHarbor" slot-scope="scope">
+          <port-info :disabled="scope.disabled" v-model="form.departureHarborId" type="id"
+                     @balabalaTow="(val)=>{balabala(val,['form','departureHarbor'])}"/>
+        </template>
+        <template slot="objectiveHarbor" slot-scope="scope">
+          <port-info :disabled="scope.disabled" v-model="form.objectiveHarborId" type="id"
+                     @balabalaTow="(val)=>{balabala(val,['form','objectiveHarbor'])}"/>
+        </template>
+      </avue-form>
+    </trade-card>
+    <trade-card title="箱信息">
+      <avue-crud
+          :option="option"
+          :data="dataList"
+          v-model="formTwo"
+          ref="crud"
+          :key="key"
+          :upload-delete="uploadDelete"
+          @row-save="rowSave"
+          @row-update="rowUpdate"
+          @selection-change="selectionChange"
+          @resetColumn="resetColumnTwo('crud','option','optionBack',243.1)"
+          @saveColumn="saveColumnTwo('crud','option','optionBack',243.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.crud.rowEdit(row,index)">编辑
+          </el-button>
+          <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
+                     @click="rowDel(row,index,'MX')">删除
+          </el-button>
+        </template>
+        <template slot="addressForm" slot-scope="scope">
+          <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled"
+                     @balabalaTow="(val)=>{balabala(val,['formTwo','address'])}"/>
+        </template>
+        <!--        <template slot="boxMakingCompanyIdForm" slot-scope="scope">-->
+        <!--          <crop-select v-model="formTwo.boxMakingCompanyId" :disabled="scope.disabled" :refresh="false"-->
+        <!--                       @getCorpData="(row)=>{getGSData(row,['formTwo','boxMakingCompany'])}" corpType="GS"/>-->
+        <!--        </template>-->
+      </avue-crud>
+    </trade-card>
+    <!--    费用信息组件-->
+    <box-cost :listData="dataListTwo" :codeValue="243.2" :tabShow="3" activeName="second" ref="boxCost"
+              url="/api/blade-box-tube/files/remove" @resetTrigger="resetTrigger"></box-cost>
+    <trade-card title="附件明细">
+      <c-upload
+          basic
+          :data="tradingBoxFilesList"
+          :disabled="disabled"
+          deleteUrl="/api/blade-box-tube/transportFiles/remove"
+          :enumerationValue="243.3"
+          display
+      />
+    </trade-card>
+    <el-dialog
+        append-to-body
+        title="审批进度"
+        class="el-dialogDeep"
+        :visible.sync="checkScheduleDialog"
+        width="40%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        v-dialog-drag
+    >
+      <check-schedule
+          :checkId="checkId"
+          :batchNo="batchNo"
+          @choceScheduleFun="choceScheduleFun"
+      ></check-schedule>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  detail,
+  submit,
+  tradingBoxItem,
+  tradingBoxFees,
+  pleaseCheck,
+  repealCancel,
+  tradingBoxFiles
+} from "@/api/boxManagement/exportShipment/index.js";
+
+import checkSchedule from "@/components/check/checkSchedule";
+import {selectByName} from "@/api/boxManagement";
+
+export default {
+  name: "detailsPage",
+  props: {
+    onLoad: Object,
+    detailData: Object
+  },
+  components: {checkSchedule},
+  data() {
+    return {
+      key: 0,
+      checkScheduleDialog: false,
+      checkId: '',
+      batchNo: '',
+      breakConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        clearable: true,
+        placeholder: "请点击右边按钮选择",
+        dicData: []
+      },
+      form: {},
+      formTwo: {},
+      formSearch: {},
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        column: [{
+          label: '系统号',
+          prop: 'sysNo',
+          disabled: true
+        }, {
+          label: '客户',
+          prop: 'companyId',
+          width: 100,
+          search: true,
+          overHidden: true,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '地点',
+          prop: 'addressId'
+        }, {
+          label: '业务日期',
+          prop: 'newDate',
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: '备注',
+          prop: 'remarks',
+          type: 'textarea',
+          minRows: 3,
+          span: 24,
+        }]
+      },
+      option: {},
+      optionBack: {
+        align: 'center',
+        index: true,
+        selection: false,
+        addBtnText: "录入明细",
+        refreshBtn: false,
+        addBtn: true,
+        span: 8,
+        addRowBtn: false,
+        cellBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: 200,
+        dialogTop: 25,
+        dialogWidth: "80%",
+        column: [{
+          label: '箱号',
+          prop: 'code',
+          overHidden: true,
+          remote: true,
+          filterable: true,
+          type: "select",
+          dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code"
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '位置',
+          prop: 'position',
+          overHidden: true,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '照片',
+          prop: 'itemFilesList',
+          overHidden: true,
+          type: 'upload',
+          span: 24,
+          listType: 'picture-card',
+          tip: '只能上传jpg/png文件,且不超过500kb',
+          propsHttp: {
+            url: 'link',
+            name: 'originalName',
+            res: 'data'
+          },
+          action: '/api/blade-resource/oss/endpoint/put-file'
+        }, {
+          label: '备注',
+          prop: 'remarks',
+          overHidden: true,
+          type: 'textarea',
+          minRows: 3,
+          span: 24,
+          width: 200
+        }]
+      },
+      dataList: [],
+      dataListTwo: [],
+      tradingBoxFilesList: [],
+      selectionList: [],
+      disabled: false,
+      costData: {}
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(243.1), this.optionBack);
+    this.optionTrack = await this.getColumnData(this.getColumnName(243.4), this.optionTrackBack);
+    this.option.selectable = (row, index) => {
+      return row.id;
+    }
+    selectByName("租金").then(res => {
+      this.costData = res.data.data
+    })
+    if (this.onLoad.id && this.detailData.id) {
+      this.refresh(this.onLoad.id, true)
+    } else if (this.onLoad.id) {
+      this.refresh(this.onLoad.id, true)
+    }
+    this.key++
+  },
+  methods: {
+    confirmEdit() {
+      if (this.form.status > 0) {
+        //基础资料
+        this.$set(this.optionForm, "disabled", true)
+        //箱信息
+        this.$set(this.option, "disabled", true)
+        this.$set(this.option, "addBtn", false)
+        this.$set(this.option, "menu", false)
+        //费用信息
+        this.$set(this.$refs.boxCost.option, "disabled", true)
+        this.$set(this.$refs.boxCost.option, "addBtn", false)
+        this.$set(this.$refs.boxCost.option, "menu", false)
+        //附件和顶部按钮
+        this.disabled = true
+      } else {
+        //基础资料
+        this.$set(this.optionForm, "disabled", false)
+        //箱信息
+        this.$set(this.option, "disabled", false)
+        this.$set(this.option, "addBtn", true)
+        this.$set(this.option, "menu", true)
+        //费用信息
+        this.$set(this.$refs.boxCost.option, "disabled", false)
+        this.$set(this.$refs.boxCost.option, "addBtn", true)
+        this.$set(this.$refs.boxCost.option, "menu", true)
+        //附件和顶部按钮
+        this.disabled = false
+      }
+    },
+    selectionChange(list) {
+      this.selectionList = list
+    },
+    track(row) {
+      // this.dataTrackList = row
+      this.formSearch = row
+      this.boxTrack = true
+    },
+    // 明细删除
+    rowDel(row, index, type) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+            if (row.id) {
+              tradingBoxItem(row.id).then(res => {
+                if (res.data.success) {
+                  this.$message.success("操作成功!");
+                  this.dataList.splice(index, 1);
+                  if (this.dataListTwo.length > 0) {
+                    for (let item in this.dataListTwo) {
+                      if (this.dataListTwo[item].code == row.code) {
+                        if (this.dataListTwo[item].autoGenerate == 1) {
+                          if (this.dataListTwo[item].id) {
+                            tradingBoxFees(this.dataListTwo[item].id).then(res => {
+                              if (res.data.success) {
+                                this.dataListTwo.splice(index, 1);
+                              }
+                            });
+                          } else {
+                            this.dataListTwo.splice(Number(item), 1);
+                          }
+                        }
+                      }
+                    }
+                  }
+                }
+              });
+            } else {
+              this.dataList.splice(index, 1);
+              this.$message.success("操作成功!");
+              if (this.dataListTwo.length > 0) {
+                for (let item in this.dataListTwo) {
+                  if (this.dataListTwo[item].code === row.code) {
+                    if (this.dataListTwo[item].autoGenerate == 1) {
+                      this.dataListTwo.splice(Number(item), 1);
+                    }
+                  }
+                }
+              }
+            }
+          }
+      )
+      ;
+    },
+    balabala(val, type) {
+      if (val === null) {
+        this[type[0]][type[1]] = ''
+      } else {
+        this[type[0]][type[1]] = val.name
+      }
+    },
+    //撤销
+    repealCancel() {
+      this.$confirm("您确定撤回此次申请吗?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        const data = {
+          id: this.form.id,
+          pageLabel: "出库装运",
+          checkFlag: 1,
+        }
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中',
+          spinner: 'el-icon-loading',
+          background: 'rgba(255,255,255,0.7)'
+        });
+        repealCancel(data).then(res => {
+          loading.close();
+          this.$message.success('撤回成功')
+          this.refresh(this.form.id)
+        })
+      })
+    },
+    // 请核
+    pleaseCheck() {
+      if (this.dataList.length === 0) {
+        return this.$message.error("箱信息不能为空")
+      }
+      if (this.$refs.boxCost.dataList.length === 0) {
+        return this.$message.error("费用信息不能为空")
+      }else {
+        for (let item of this.$refs.boxCost.dataList){
+          if (!item.id){
+            return this.$message.error("费用信息未保存")
+          }
+        }
+      }
+      this.$confirm("您确定提交请核申请吗?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.$refs["form"].validate((valid, done) => {
+          done()
+          if (valid) {
+            let data = {
+              ...this.form,
+              repairItemList: this.dataList,
+              repairFeesList: this.dataListTwo,
+              filesList: this.tradingBoxFilesList,
+              billType: "WASH",
+              checkFlag: 2
+            }
+            const loading = this.$loading({
+              lock: true,
+              text: '加载中',
+              spinner: 'el-icon-loading',
+              background: 'rgba(255,255,255,0.7)'
+            });
+            submit(data).then(res => {
+              const data = {
+                id: res.data.data.id,
+                url: '/boxManagement/exportShipment/index',
+                pageStatus: "this.$store.getters.domSaleStatus",
+                pageLabel: "出口装运",
+                checkFlag: 1,
+              }
+              pleaseCheck({
+                ...data,
+                billType: "WASH"
+              }).then(rest => {
+                loading.close();
+                this.$message.success('请核成功')
+                this.refresh(res.data.data.id)
+              }).catch(() => {
+                loading.close();
+              })
+            }).catch(() => {
+              loading.close();
+            })
+          }
+        });
+      })
+    },
+    //审核关闭
+    choceScheduleFun() {
+      this.checkScheduleDialog = false
+    },
+    refresh(id, type) {
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      detail({id: id}).then(res => {
+        this.form = res.data.data
+        this.dataList = res.data.data.repairItemList
+        this.dataListTwo = res.data.data.repairFeesList
+        this.tradingBoxFilesList = res.data.data.filesList
+        delete this.form.repairItemList
+        delete this.form.repairFeesList
+        delete this.form.filesList
+        loading.close();
+        if (type) {
+          //基础资料
+          this.$set(this.optionForm, "disabled", true)
+          //箱信息
+          this.$set(this.option, "disabled", true)
+          this.$set(this.option, "addBtn", false)
+          this.$set(this.option, "menu", false)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option, "menu", false)
+          //附件和顶部按钮
+          this.disabled = true
+        } else {
+          if (this.form.status > 0) {
+            //基础资料
+            this.$set(this.optionForm, "disabled", true)
+            //箱信息
+            this.$set(this.option, "disabled", true)
+            this.$set(this.option, "addBtn", false)
+            this.$set(this.option, "menu", false)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", true)
+            this.$set(this.$refs.boxCost.option, "addBtn", false)
+            this.$set(this.$refs.boxCost.option, "menu", false)
+            //附件和顶部按钮
+            this.disabled = true
+          } else {
+            //基础资料
+            this.$set(this.optionForm, "disabled", false)
+            //箱信息
+            this.$set(this.option, "disabled", false)
+            this.$set(this.option, "addBtn", true)
+            this.$set(this.option, "menu", true)
+            //费用信息
+            this.$set(this.$refs.boxCost.option, "disabled", false)
+            this.$set(this.$refs.boxCost.option, "addBtn", true)
+            this.$set(this.$refs.boxCost.option, "menu", true)
+            //附件和顶部按钮
+            this.disabled = false
+          }
+        }
+      })
+    },
+    //新增修改
+    editCustomer() {
+      this.$refs["form"].validate((valid, done) => {
+        done()
+        if (valid) {
+          let data = {
+            ...this.form,
+            repairItemList: this.dataList,
+            repairFeesList: this.dataListTwo,
+            filesList: this.tradingBoxFilesList,
+            billType: "WASH"
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          submit(data).then(res => {
+            if (this.form.id) {
+              this.$message.success("修改成功")
+            } else {
+              this.$message.success("新增成功")
+            }
+            loading.close();
+            this.refresh(res.data.data.id)
+          }).catch(() => {
+            loading.close();
+          })
+        }
+      });
+    },
+    //删除图片
+    uploadDelete(file, column) {
+      return new Promise((resolve, reject) => {
+        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          if (this.formTwo.itemFilesList[file.uid].id) {
+            tradingBoxFiles(this.formTwo.itemFilesList[file.uid].id).then(res => {
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              });
+              resolve();
+            })
+          } else {
+            resolve()
+          }
+        }).catch(()=>{
+          reject();
+          this.$message({
+            type: "info",
+            message: "已取消删除"
+          });
+        })
+      })
+    },
+    rowSave(form, done, loading) {
+      let result = this.dataList.some((item) => {
+        if (item.code == form.code) {
+          return true
+        }
+      })
+      if (result === true) {
+        this.$message.error("已存在此箱号");
+        return loading();
+      }
+      done(form)
+    },
+    rowUpdate(form, index, done, loading) {
+      form.boxType = form.$boxTypeId
+      done(form)
+    },
+    getGSData(row, type) {
+      this[type[0]][type[1]] = row.cname
+    },
+    backToList(type) {
+      if (type == 0) {
+        if (this.detailData.id) {
+          this.$router.push({
+            path: '/boxManagement/exportShipment/index'
+          });
+        }
+        this.$emit("backToList", type);
+      } else if (type == 1) {
+        this.$router.push({
+          path: '/approveData/index'
+        });
+        this.$emit("backToList", type);
+      }
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    resetTrigger() {
+      if (this.optionForm.disabled == true) {
+        if (this.form.status > 0) {
+          //基础资料
+          this.$set(this.optionForm, "disabled", true)
+          //箱信息
+          this.$set(this.option, "disabled", true)
+          this.$set(this.option, "addBtn", false)
+          this.$set(this.option, "menu", false)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", true)
+          this.$set(this.$refs.boxCost.option, "addBtn", false)
+          this.$set(this.$refs.boxCost.option, "menu", false)
+          //附件和顶部按钮
+          this.disabled = true
+        } else {
+          //基础资料
+          this.$set(this.optionForm, "disabled", false)
+          //箱信息
+          this.$set(this.option, "disabled", false)
+          this.$set(this.option, "addBtn", true)
+          this.$set(this.option, "menu", true)
+          //费用信息
+          this.$set(this.$refs.boxCost.option, "disabled", false)
+          this.$set(this.$refs.boxCost.option, "addBtn", true)
+          this.$set(this.$refs.boxCost.option, "menu", true)
+          //附件和顶部按钮
+          this.disabled = false
+        }
+      } else {
+        //基础资料
+        this.$set(this.optionForm, "disabled", false)
+        //箱信息
+        this.$set(this.option, "disabled", false)
+        this.$set(this.option, "addBtn", true)
+        this.$set(this.option, "menu", true)
+        //费用信息
+        this.$set(this.$refs.boxCost.option, "disabled", false)
+        this.$set(this.$refs.boxCost.option, "addBtn", true)
+        this.$set(this.$refs.boxCost.option, "menu", true)
+        //附件和顶部按钮
+        this.disabled = false
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.resetTrigger()
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+::v-deep .el-form-item {
+  margin-bottom: 8px;
+}
+</style>

+ 224 - 0
src/views/boxManagement/boxWashing/index.vue

@@ -0,0 +1,224 @@
+<template>
+  <div>
+    <basic-container v-show="!detailsOpen">
+      <avue-crud
+          :option="option"
+          :search.sync="search"
+          v-model="form"
+          :table-loading="loading"
+          :data="dataList"
+          ref="crud"
+          @on-load="onLoad"
+          @search-change="searchChange"
+          @row-del="rowDel"
+          @refresh-change="refreshChange"
+          @resetColumn="resetColumnTwo('crud','option','optionList',243)"
+          @saveColumn="saveColumnTwo('crud','option','optionList',243)"
+          :page.sync="page">
+        <template slot="addressSearch">
+          <port-info v-model="search.addressId" type="id"/>
+        </template>
+        <template slot="companySearch" slot-scope="scope">
+          <crop-select v-model="search.companyId" corpType="GS"/>
+        </template>
+        <template slot-scope="{type,size,row,$index}" slot="menu">
+          <el-button icon="el-icon-view" :size="size" :type="type" @click="check(row)">查看</el-button>
+          <el-button icon="el-icon-delete" :size="size" v-if="row.status == 0" :type="type"
+                     @click="$refs.crud.rowDel(row,$index)">删除
+          </el-button>
+        </template>
+        <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">创建单据</el-button>
+          <el-button class="el-icon-document-copy" type="success" size="small">复制单据</el-button>
+          <el-button class="el-icon-download" type="warning" size="small">导出</el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detailsPage v-if="detailsOpen" :onLoad="form" @backToList="backToList" :detailData="detailData"></detailsPage>
+  </div>
+</template>
+
+<script>
+import {getList, remove} from "@/api/boxManagement/boxRepair/index.js";
+import detailsPage from "./detailsPage"
+
+export default {
+  name: "index",
+  components: {
+    detailsPage
+  },
+  data() {
+    return {
+      detailsOpen: false,
+      loading: false,
+      search: {},
+      detailData: {},
+      form: {},
+      dataList: [],
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      optionList: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        height: "auto",
+        searchMenuPosition: "right",
+        align: "center",
+        menuWidth: 140,
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        dialogWidth: "70%",
+        column: [{
+          label: '系统号',
+          prop: 'sysNo',
+          overHidden: true
+        }, {
+          label: '客户',
+          prop: 'company',
+          search: true,
+          overHidden: true
+        }, {
+          label: '地点',
+          prop: 'address',
+          search: true,
+          overHidden: true
+        }, {
+          label: '业务日期',
+          prop: 'newDate',
+          searchProp: 'newDateList',
+          search: true,
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: '备注',
+          prop: 'remarks',
+          overHidden: true
+        }]
+      }
+    }
+  },
+  activated() {
+    if (this.$route.query.check) {
+      this.detailsOpen = false
+      this.detailData = {
+        id: this.$route.query.check.billId,
+        check: this.$route.query.check,
+      };
+      this.form = {
+        id: this.$route.query.check.billId
+      }
+      this.detailsOpen = true
+      this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(243), this.optionList);
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0) {
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  methods: {
+    check(row) {
+      this.form = row
+      this.detailsOpen = true
+    },
+    backToList(type) {
+      this.form = {}
+      this.detailsOpen = false
+      if (type === 0) {
+        this.detailData = {}
+      }
+      this.onLoad(this.page, this.search)
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search)
+    },
+    rowDel(form, index) {
+      this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        remove(form.id).then(res => {
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+        })
+      }).catch(() => {
+      });
+    },
+    searchChange(params, done) {
+      done();
+      this.onLoad(this.page, params)
+    },
+    onLoad(page, params = {}) {
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+        billType: "WASH",
+        ...Object.assign(params, this.search)
+      }
+      this.loading = true
+      getList(params).then(res => {
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+
+//自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+//自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 7 - 1
src/views/boxManagement/buyContainer/detailsPage.vue

@@ -604,8 +604,14 @@ export default {
             if (this.dataList.length === 0) {
               return this.$message.error("箱信息不能为空")
             }
-            if (this.dataListTwo.length === 0) {
+            if (this.$refs.boxCost.dataList.length === 0) {
               return this.$message.error("费用信息不能为空")
+            }else {
+              for (let item of this.$refs.boxCost.dataList){
+                if (!item.id){
+                  return this.$message.error("费用信息未保存")
+                }
+              }
             }
             let data = {
               ...this.form,

+ 7 - 1
src/views/boxManagement/exportShipment/detailsPage.vue

@@ -987,8 +987,14 @@ export default {
       if (this.dataList.length === 0) {
         return this.$message.error("箱信息不能为空")
       }
-      if (this.dataListTwo.length === 0) {
+      if (this.$refs.boxCost.dataList.length === 0) {
         return this.$message.error("费用信息不能为空")
+      }else {
+        for (let item of this.$refs.boxCost.dataList){
+          if (!item.id){
+            return this.$message.error("费用信息未保存")
+          }
+        }
       }
       this.$confirm("您确定提交请核申请吗?", {
         confirmButtonText: "确定",

+ 7 - 1
src/views/boxManagement/importReturnTrip/detailsPage.vue

@@ -991,8 +991,14 @@ export default {
       if (this.dataList.length === 0) {
         return this.$message.error("箱信息不能为空")
       }
-      if (this.dataListTwo.length === 0) {
+      if (this.$refs.boxCost.dataList.length === 0) {
         return this.$message.error("费用信息不能为空")
+      }else {
+        for (let item of this.$refs.boxCost.dataList){
+          if (!item.id){
+            return this.$message.error("费用信息未保存")
+          }
+        }
       }
       this.$confirm("您确定提交请核申请吗?", {
         confirmButtonText: "确定",

+ 7 - 1
src/views/boxManagement/sellingContainers/detailsPage.vue

@@ -602,8 +602,14 @@ export default {
             if (this.dataList.length === 0) {
               return this.$message.error("箱信息不能为空")
             }
-            if (this.dataListTwo.length === 0) {
+            if (this.$refs.boxCost.dataList.length === 0) {
               return this.$message.error("费用信息不能为空")
+            }else {
+              for (let item of this.$refs.boxCost.dataList){
+                if (!item.id){
+                  return this.$message.error("费用信息未保存")
+                }
+              }
             }
             let data = {
               ...this.form,

+ 1 - 1
src/views/salesManagement/salesContract/detailsPage.vue

@@ -588,7 +588,7 @@ export default {
           },
           {
             label: '采购单号',
-            prop: 'srcSysNo',
+            prop: 'srcOrderNo',
             disabled: true,
             rules: [
               {

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است