소스 검색

山能抵押

wangzhuo 1 년 전
부모
커밋
45d918ff95
4개의 변경된 파일1009개의 추가작업 그리고 12개의 파일을 삭제
  1. 56 0
      src/api/Warehousing/mortgage.js
  2. 571 0
      src/views/Warehousing/mortgage/detailsPage.vue
  3. 370 0
      src/views/Warehousing/mortgage/index.vue
  4. 12 12
      src/views/basicdata/goods/index.vue

+ 56 - 0
src/api/Warehousing/mortgage.js

@@ -0,0 +1,56 @@
+import request from '@/utils/request'
+
+// 查询部门列表
+export function mortgageList(query) {
+  return request({
+    url: '/warehouseBusiness/outStock/mortgageList',
+    method: 'get',
+    params: query
+  })
+}
+
+export function mortgageDetail(id) {
+  return request({
+    url: '/warehouseBusiness/outStock/mortgage/' + id,
+    method: 'get'
+  })
+}
+
+export function distribution(query) {
+  return request({
+    url: '/warehouseBusiness/outStock/distribution',
+    method: 'get',
+    params: query
+  })
+}
+
+export function addCollateralGoods(data) {
+  return request({
+    url: '/warehouseBusiness/outStock/collateralCargoInformation',
+    method: 'post',
+    data: data
+  })
+}
+
+export function collateralGoods(id) {
+  return request({
+    url: '/warehouseBusiness/outStock/collateralGoods/' + id,
+    method: 'get'
+  })
+}
+
+export function mortgageFeedback(query) {
+  return request({
+    url: '/warehouseBusiness/outStock/mortgage/feedback',
+    method: 'get',
+    params: query
+  })
+}
+
+export function masterSuppressThePreservationOfGoods(data) {
+  return request({
+    url: '/warehouseBusiness/outStock/mortgage/preservation',
+    method: 'post',
+    data: data
+  })
+}

+ 571 - 0
src/views/Warehousing/mortgage/detailsPage.vue

@@ -0,0 +1,571 @@
+<template>
+  <div>
+    <el-breadcrumb separator="/" style="display: flex; align-items: center; margin-bottom: 10px">
+      <el-breadcrumb-item>
+        <el-button plain size="mini" type="danger" icon="el-icon-arrow-left" @click="backToList">
+          返回列表
+        </el-button>
+      </el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-form :model="data" ref="queryForm" :rules="rules" :inline="true" label-width="180px">
+
+
+<!--      <el-form-item label="提单号" prop="fMblno">-->
+<!--        <el-input-->
+<!--          v-model="data.fMblno"-->
+<!--          placeholder="请输入编号"-->
+<!--          disabled-->
+<!--          size="small"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+
+      <el-form-item label="客户名称" prop="fCorpid">
+<!--        <el-input-->
+<!--          v-model="data.fCorpid"-->
+<!--          placeholder="请输入编号"-->
+<!--          disabled-->
+<!--          size="small"-->
+<!--        />-->
+
+        <el-select v-model="data.fCorpid" clearable disabled filterable placeholder="请输入关键词"
+                   size="small" style="width: 184px">
+          <el-option v-for="(item, index) in fMblnoOptions" :key="index.fId" :label="item.fName"
+                     :value="item.fId"></el-option>
+        </el-select>
+      </el-form-item>
+
+
+
+      <el-form-item label="产业平台业务编号" prop="businessCode">
+        <el-input
+          v-model="data.businessCode"
+          placeholder="请输入编号"
+          disabled
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="数仓平台对应编号" prop="serialNumber">
+        <el-input
+          v-model="data.serialNumber"
+          placeholder="请输入编号"
+          disabled
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="仓库编码" prop="positionCode">
+        <el-input
+          v-model="data.positionCode"
+          placeholder="请输入编号"
+          disabled
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="产业平台仓单申请号" prop="receiptApplyCode">
+        <el-input
+          v-model="data.receiptApplyCode"
+          placeholder="请输入编号"
+          disabled
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="fBillstatusName">
+        <el-input
+          v-model="data.fBillstatusName"
+          placeholder="请输入编号"
+          disabled
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="提交人" prop="createBy">
+        <el-input
+          v-model="data.createBy"
+          placeholder="请输入编号"
+          disabled
+          size="small"
+        />
+      </el-form-item>
+<!--      <el-form-item label="客户名称" prop="fCorpid">-->
+<!--        <el-input-->
+<!--          v-model="data.fCorpid"-->
+<!--          placeholder="请输入编号"-->
+<!--          disabled-->
+<!--          size="small"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+
+      <el-form-item label="仓储公司名称" prop="storageName">
+        <el-input
+          v-model="data.storageName"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="仓储合同编号" prop="storageContractCode">
+        <el-input
+          v-model="data.storageContractCode"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="仓储合同开始时间" prop="storageContractStart">
+        <el-date-picker
+          v-model="data.storageContractStart"
+          style="width: 184px"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+          type="date"
+          :disabled="!isEdit"
+          placeholder="选择日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="仓储合同结束时间" prop="storageContractEnd">
+        <el-date-picker
+          v-model="data.storageContractEnd"
+          style="width: 184px"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+          type="date"
+          :disabled="!isEdit"
+          placeholder="选择日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="仓储费率" prop="storageRate">
+        <el-input
+          v-model="data.storageRate"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="仓储缴纳日期" prop="storagePayTime">
+        <el-date-picker
+          v-model="data.storagePayTime"
+          style="width: 184px"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+          type="date"
+          :disabled="!isEdit"
+          placeholder="选择日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="保险单号" prop="insuranceCode">
+        <el-input
+          v-model="data.insuranceCode"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="保险金额" prop="insuranceAmount">
+        <el-input
+          v-model="data.insuranceAmount"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="保险开始时间" prop="insuranceStartTime">
+        <el-date-picker
+          v-model="data.insuranceStartTime"
+          style="width: 184px"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+          type="date"
+          :disabled="!isEdit"
+          placeholder="选择日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="保险结束时间" prop="insuranceEndTime">
+        <el-date-picker
+          v-model="data.insuranceEndTime"
+          style="width: 184px"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+          type="date"
+          :disabled="!isEdit"
+          placeholder="选择日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="保险人" prop="insurer">
+        <el-input
+          v-model="data.insurer"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="存货申请人" prop="inventory">
+        <el-input
+          v-model="data.inventory"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="保管审核人" prop="operator">
+        <el-input
+          v-model="data.operator"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="保管复核人" prop="auditor">
+        <el-input
+          v-model="data.auditor"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="备注" prop="remark">
+        <el-input
+          v-model="data.remark"
+          placeholder="请输入"
+          :disabled="!isEdit"
+          size="small"
+        />
+      </el-form-item>
+    </el-form>
+
+    <div style="margin: 8px">
+      <el-button type="primary" size="mini" :disabled="selectDisable || !isEdit || typeDisabled" @click="masterPreservation">保存</el-button>
+      <el-button type="primary" size="mini" :disabled="isEdit || typeDisabled" @click="isEdit = true; data.storageRate ? data.storageRate : 0">编辑</el-button>
+      <el-button type="primary" size="mini" :disabled="selectDisable || isEdit || isEditRetinue || typeDisabled" @click="feedback()">配货完成</el-button>
+    </div>
+    <el-collapse v-model="activeNames">
+      <el-collapse-item name="1">
+        <template slot="title">
+          <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">货物信息</span>
+        </template>
+        <el-table :data="goodsTypeList">
+<!--          <el-table-column type="selection" width="55" align="center" />-->
+          <el-table-column label="SPU" align="center" prop="spuId" />
+          <el-table-column label="SKU" align="center" prop="skuId" />
+          <el-table-column label="提单号" align="center" prop="billOfLading" />
+          <el-table-column label="重量(吨)" align="center" prop="goodsWeight" />
+          <el-table-column label="数量" align="center" prop="goodsQuantity" />
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="inquireGoodsList(scope.row)"
+              >配货</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-collapse-item>
+      <el-collapse-item name="2">
+        <template slot="title">
+          <span style="font-size: 16px; font-weight: bolder; margin-left: 5px">配货</span>
+        </template>
+        <div style="margin: 8px">
+<!--          <el-button type="primary" size="mini" :disabled="!isEditRetinue || typeDisabled" @click="importData()">导入</el-button>-->
+          <el-button type="primary" size="mini" :disabled="!isEditRetinue || typeDisabled" @click="PickUpPreservation()">保存</el-button>
+          <el-button type="primary" size="mini" :disabled="isEditRetinue || typeDisabled" @click="isEditRetinue = true;">编辑</el-button>
+        </div>
+
+        <el-table :data="goodsList">
+          <el-table-column label="库区" align="center" prop="fWarehouseInformation" />
+          <el-table-column label="数量" align="center" prop="fQtyD">
+            <template slot-scope="scope">
+              <el-input-number v-model="scope.row.fQtyD" :disabled="!isEditRetinue" controls-position="right" :min="0" :precision="0"></el-input-number>
+            </template>
+          </el-table-column>
+          <el-table-column label="毛重(吨)" align="center" prop="fGrossweightD">
+            <template slot-scope="scope">
+              <el-input-number v-model="scope.row.fGrossweightD" :disabled="!isEditRetinue" controls-position="right" :min="0"></el-input-number>
+            </template>
+          </el-table-column>
+          <el-table-column label="提单号" align="center" prop="fMblno" />
+          <el-table-column label="备注" align="center" prop="remark">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.remark" :disabled="!isEditRetinue"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                :disabled="!isEditRetinue || typeDisabled"
+                @click="retinueDelete(scope)"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-collapse-item>
+    </el-collapse>
+
+    <el-dialog
+      title="导入"
+      :visible.sync="dialogVisible"
+      width="30%">
+      <el-table :data="importGoodsList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="库区" align="center" prop="fWarehouseInformation" />
+        <el-table-column label="数量" align="center" prop="fQtyD" />
+        <el-table-column label="毛重(吨)" align="center" prop="fGrossweightD" />
+      </el-table>
+
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="importDataConfirm()">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { mortgageDetail, distribution, addCollateralGoods, collateralGoods, mortgageFeedback, masterSuppressThePreservationOfGoods } from "@/api/Warehousing/mortgage";
+import { listCorps } from "@/api/basicdata/corps";
+export default {
+  name: 'Fees',
+  components: {},
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
+  data() {
+    return {
+      queryParams: {
+        kpTime: new Date(),
+        type: 2
+      },
+      data: {},
+      form: {},
+      activeNames: ['1', '2'],
+      goodsTypeList: [],
+      goodsList: [],
+      importGoodsList: [],
+      dialogVisible: false,
+      // 选择操作禁用
+      selectDisable: false,
+      // 小保存数据禁用
+      retinuePreservationDisable: true,
+      // 编辑状态
+      isEdit: false,
+      // 抵押状态
+      typeDisabled: true,
+      isEditRetinue: false,
+      goodsType: {},
+      multipleSelection: [],
+      fMblnoOptions: [],
+      rules: {
+        storageName: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        storageContractCode: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        storageContractStart: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        storageContractEnd: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        storageRate: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        storagePayTime: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        insuranceCode: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        insuranceAmount: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        insuranceStartTime: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        insuranceEndTime: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        insurer: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        inventory: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        operator: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        auditor: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+      },
+    }
+  },
+  created() {
+
+
+    listCorps({ type: 1 }).then((response) => {
+      this.fMblnoOptions = response.rows;
+    });
+
+    if (this.detailData.id != null) {
+      mortgageDetail(this.detailData.id).then(res => {
+        // 1 抵押申请 2 抵押取消 3 抵押成功 4 抵押失败 5 已提交配货 6 申请失败 7 解押成功
+        if (res.fBillstatus == '1') {
+          res.fBillstatusName = '抵押申请'
+        } else if (res.fBillstatus == '2') {
+          res.fBillstatusName = '抵押取消'
+        } else if (res.fBillstatus == '3') {
+          res.fBillstatusName = '抵押成功'
+        } else if (res.fBillstatus == '4') {
+          res.fBillstatusName = '抵押失败'
+        } else if (res.fBillstatus == '5') {
+          res.fBillstatusName = '已提交配货'
+        } else if (res.fBillstatus == '6') {
+          res.fBillstatusName = '申请失败'
+        } else if (res.fBillstatus == '7') {
+          res.fBillstatusName = '解押成功'
+        }
+        if (res.fBillstatus == '1' ||
+          res.fBillstatus == '4' ||
+          res.fBillstatus == '6' ||
+          res.fBillstatus == '7') {
+          this.typeDisabled = false
+        }
+
+        this.data = res
+        this.goodsTypeList = res.skuItemList
+      })
+    } else {
+
+    }
+
+  },
+  methods: {
+    masterPreservation() {
+      this.$refs['queryForm'].validate((valid) => {
+        if (valid) {
+          masterSuppressThePreservationOfGoods(this.data).then(res => {
+            this.isEdit = false
+            this.$message({
+              message: '保存成功',
+              type: 'success'
+            });
+          })
+        }
+      });
+    },
+    retinueDelete(scope) {
+      console.log(scope)
+      this.goodsList.splice(scope.$index, 1)
+    },
+    // 配货保存
+    PickUpPreservation() {
+      addCollateralGoods({pid: this.goodsType.id, list: this.goodsList}).then(res => {
+        this.selectDisable = false
+        this.retinuePreservationDisable = true
+        this.isEditRetinue = false
+        this.isEdit = false
+        this.$message({
+          message: '配货信息保存成功',
+          type: 'success'
+        });
+      })
+    },
+    // 导入数据确认
+    importDataConfirm() {
+      this.multipleSelection.forEach(datas => {
+        datas.pid = this.goodsType.id
+      })
+      this.goodsList.push(...this.multipleSelection)
+      this.dialogVisible = false
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 导入
+    importData() {
+      if (this.goodsType) {
+        distribution(this.goodsType).then(res => {
+          this.importGoodsList = res.data
+          this.dialogVisible = true
+        })
+      } else {
+        this.$message({
+          message: '请先选择数据数据',
+          type: 'warning'
+        });
+      }
+    },
+    inquireGoodsList(row) {
+      collateralGoods(row.id).then(res => {
+
+        this.goodsType = row
+        this.goodsType.ownerId = this.data.fCorpid
+
+
+        this.goodsList = res.data
+        // this.selectDisable = true;
+        this.retinuePreservationDisable = false;
+
+        if (this.data.fBillstatusName == '抵押申请') {
+          this.isEditRetinue = true;
+          this.importData();
+        }
+      })
+    },
+    backToList() {
+      this.$emit('goBack')
+    },
+    feedback(type) {
+      this.$refs['queryForm'].validate((valid) => {
+        if (valid) {
+          // 判断按钮 1 配货完成 2 不可配货
+          // if (type === 1) {
+          console.log(this.data.fId, 'fid')
+            mortgageFeedback({fId: this.data.fId, operationType: 10}).then(res => {
+              this.typeDisabled = true
+              this.$message({
+                message: '提交成功',
+                type: 'success'
+              });
+            })
+          // } else if (type === 2) {
+          //   if (this.data.remark) {
+          //     mortgageFeedback({fId: this.data.fId, operationType: 20}).then(res => {
+          //       this.$message({
+          //         message: '提交成功',
+          //         type: 'success'
+          //       });
+          //     })
+          //   } else {
+          //     this.$message({
+          //       message: '请输入备注',
+          //       type: 'warning'
+          //     });
+          //   }
+          // }
+
+        } else {
+          this.$message({
+            message: '请输入必填项',
+            type: 'warning'
+          });
+        }
+      });
+
+    }
+  }
+}
+</script>
+
+<style scoped>
+::v-deep.el-form-item {
+  margin-bottom: 6px;
+}
+</style>

+ 370 - 0
src/views/Warehousing/mortgage/index.vue

@@ -0,0 +1,370 @@
+<template>
+  <div class="app-container">
+
+    <div v-show="isShow">
+      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+        <el-form-item label="产业平台仓单申请号" prop="receiptApplyCode">
+          <el-input
+            v-model="queryParams.receiptApplyCode"
+            placeholder="请输入编号"
+            clearable
+            size="small"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+
+  <!--    <el-row :gutter="10" class="mb8">-->
+  <!--      <el-col :span="1.5">-->
+  <!--        <el-button-->
+  <!--          type="primary"-->
+  <!--          icon="el-icon-plus"-->
+  <!--          size="mini"-->
+  <!--          @click="handleAdd"-->
+  <!--          v-hasPermi="['basicdata:goods:add']"-->
+  <!--        >新增</el-button>-->
+  <!--      </el-col>-->
+  <!--      <el-col :span="1.5">-->
+  <!--        <el-button-->
+  <!--          type="success"-->
+  <!--          icon="el-icon-edit"-->
+  <!--          size="mini"-->
+  <!--          :disabled="single"-->
+  <!--          @click="handleUpdate"-->
+  <!--          v-hasPermi="['basicdata:goods:edit']"-->
+  <!--        >修改</el-button>-->
+  <!--      </el-col>-->
+  <!--      <el-col :span="1.5">-->
+  <!--        <el-button-->
+  <!--          type="danger"-->
+  <!--          icon="el-icon-delete"-->
+  <!--          size="mini"-->
+  <!--          :disabled="multiple"-->
+  <!--          @click="handleDelete"-->
+  <!--          v-hasPermi="['basicdata:goods:remove']"-->
+  <!--        >删除</el-button>-->
+  <!--      </el-col>-->
+  <!--      <el-col :span="1.5">-->
+  <!--        <el-button-->
+  <!--          type="warning"-->
+  <!--          icon="el-icon-download"-->
+  <!--          size="mini"-->
+  <!--          @click="handleExport"-->
+  <!--          v-hasPermi="['basicdata:goods:export']"-->
+  <!--        >导出</el-button>-->
+  <!--      </el-col>-->
+  <!--      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
+  <!--    </el-row>-->
+
+      <el-table v-loading="loading" :data="goodsList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="产业平台业务编号" align="center" prop="businessCode" />
+        <el-table-column label="数仓平台对应编号" align="center" prop="serialNumber" />
+        <el-table-column label="产业平台仓单申请号" align="center" prop="receiptApplyCode" />
+        <el-table-column label="数量" align="center" prop="fQty" />
+        <el-table-column label="重量(吨)" align="center" prop="fNetweight" />
+        <el-table-column label="状态" align="center" prop="fBillstatus" />
+        <el-table-column label="提交人" align="center" prop="createBy" />
+        <el-table-column label="客户名称" align="center" prop="fCorpName" />
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+            >配货</el-button>
+  <!--          <el-button-->
+  <!--            size="mini"-->
+  <!--            type="text"-->
+  <!--            icon="el-icon-edit"-->
+  <!--            @click="handleUpdate(scope.row)"-->
+  <!--            v-hasPermi="['basicdata:goods:edit']"-->
+  <!--          >修改</el-button>-->
+  <!--          <el-button-->
+  <!--            size="mini"-->
+  <!--            type="text"-->
+  <!--            icon="el-icon-delete"-->
+  <!--            @click="handleDelete(scope.row)"-->
+  <!--            v-hasPermi="['basicdata:goods:remove']"-->
+  <!--          >删除</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+
+      <!-- 添加或修改商品详情对话框 -->
+      <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+          <el-form-item label="编号" prop="fNo">
+            <el-input v-model="form.fNo" placeholder="请输入编号" />
+          </el-form-item>
+          <el-form-item label="名称" prop="fName">
+            <el-input v-model="form.fName" placeholder="请输入名称" />
+          </el-form-item>
+          <el-form-item label="英文名称" prop="fEnam">
+            <el-input v-model="form.fEnam" placeholder="请输入英文名称" />
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </el-dialog>
+    </div>
+    <detailPage v-if="!isShow" ref="detail" :detailData="detailData" @goBack="goBack"></detailPage>
+  </div>
+</template>
+
+<script>
+import { mortgageList, getGoods, delGoods, addGoods, updateGoods, exportGoods } from "@/api/Warehousing/mortgage";
+import { listCorps } from "@/api/basicdata/corps";
+import detailPage from './detailsPage'
+export default {
+  name: "Goods",
+  components: {
+    detailPage
+  },
+  data() {
+    return {
+      isShow: true,
+      detailData: {},
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 商品详情表格数据
+      goodsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 备注字典
+      fIdOptions: [],
+      // 删除状态字典
+      delFlagOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        fTypeid: null,
+        fNo: null,
+        fName: null,
+        fEnam: null,
+        fSpecs: null,
+        fPackagespecs: null,
+        fColor: null,
+        fHscode: null,
+        fPackageid: null,
+        fStatus: null,
+      },
+      // 表单参数
+      form: {},
+      pledgeType: [],
+      fMblnoOptions: [],
+      // 表单校验
+      rules: {
+        fNo: [
+          { required: true, message: "编号不能为空", trigger: "blur" }
+        ],
+        fName: [
+          { required: true, message: "名称不能为空", trigger: "blur" }
+        ],
+        fEnam: [
+          { required: true, message: "英文名称不能为空", trigger: "blur" }
+        ],
+        fSpecs: [
+          { required: true, message: "规格不能为空", trigger: "blur" }
+        ],
+        fPackagespecs: [
+          { required: true, message: "包装规格,20、25、35、50、850,kg不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    listCorps({ type: 1 }).then((response) => {
+      this.fMblnoOptions = response.rows;
+    });
+    this.getDicts("data_customer_category").then(response => {
+      this.fIdOptions = response.data;
+    });
+    this.getDicts("data_delete_state").then(response => {
+      this.delFlagOptions = response.data;
+    });
+    this.getDicts("pledge_type").then(response => {
+      this.pledgeType = response.data;
+    });
+    this.getList();
+  },
+  methods: {
+    goBack() {
+      this.isShow = true
+    },
+    /** 查询商品详情列表 */
+    getList() {
+      this.loading = true;
+      mortgageList(this.queryParams).then(response => {
+
+        response.rows.forEach(data => {
+
+          for (let fMblnoOption of this.fMblnoOptions) {
+            if (fMblnoOption.fId == data.fCorpid) {
+              data.fCorpName = fMblnoOption.fName
+              break
+            }
+          }
+
+          for (let datas of this.pledgeType) {
+            if (datas.dictValue == data.fBillstatus) {
+              data.fBillstatus = datas.dictLabel
+            }
+          }
+        })
+
+        this.goodsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 包装规格,20、25、35、50、850,kg字典翻译
+    fIdFormat(row, column) {
+      return this.selectDictLabel(this.fIdOptions, row.fId);
+    },
+    // 删除状态字典翻译
+    delFlagFormat(row, column) {
+      return this.selectDictLabel(this.delFlagOptions, row.delFlag);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        fId: null,
+        fTypeid: null,
+        fNo: null,
+        fName: null,
+        fEnam: null,
+        fSpecs: null,
+        fPackagespecs: null,
+        fColor: null,
+        fHscode: null,
+        fPackageid: null,
+        fStatus: "0",
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.fId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加商品详情";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.detailData = {
+        id: row.fId
+      }
+      this.isShow = false
+      // this.reset();
+      // const fId = row.fId || this.ids
+      // getGoods(fId).then(response => {
+      //   this.form = response.data;
+      //   this.open = true;
+      //   this.title = "修改商品详情";
+      // });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.fId != null) {
+            updateGoods(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addGoods(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const fIds = row.fId || this.ids;
+      this.$confirm('是否确认删除商品详情编号为"' + fIds + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return delGoods(fIds);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有商品详情数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return exportGoods(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    }
+  }
+};
+</script>

+ 12 - 12
src/views/basicdata/goods/index.vue

@@ -285,18 +285,18 @@
         </el-row>
 
 
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="SKU">
-              <el-input v-model="form.sku" placeholder="请输入内容" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="SPU">
-              <el-input v-model="form.spu" placeholder="请输入内容" />
-            </el-form-item>
-          </el-col>
-        </el-row>
+<!--        <el-row>-->
+<!--          <el-col :span="12">-->
+<!--            <el-form-item label="SKU">-->
+<!--              <el-input v-model="form.sku" placeholder="请输入内容" />-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
+<!--          <el-col :span="12">-->
+<!--            <el-form-item label="SPU">-->
+<!--              <el-input v-model="form.spu" placeholder="请输入内容" />-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
+<!--        </el-row>-->
 
         <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />