Pārlūkot izejas kodu

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

qukaidi 2 gadi atpakaļ
vecāks
revīzija
bd4fd22cfe

+ 170 - 55
src/views/bidingDocument/issueTender/detailsPageEdit.vue

@@ -12,17 +12,25 @@
       </div>
       <div>
         <div class="el-button&#45;&#45;small-yh add-customer-btn">
-          <el-button type="success" size="small" @click="release()" v-if="form.status === 3">发布</el-button>
-          <el-button type="danger" size="small" @click="toVoid()" v-if="form.status > 3">取消发布</el-button>
-          <el-button type="primary" size="small" @click="pleaseCheck()" v-if="form.status === 0">请核</el-button>
+          <el-button type="success" size="small" @click="release()" :disabled="form.status !== 3">发布</el-button>
+          <el-button type="warning" size="small" @click="pleaseCheck()" :disabled="form.status !== 0">请核</el-button>
           <el-button type="warning" size="small" @click.stop="checkDialog = true,checkData = detailData.check" v-if="checkDisabled">审批</el-button>
-          <el-button type="warning" size="small" @click.native="checkScheduleDialog = true,checkId=form.id" v-if="form.status>0">审批进度</el-button>
           <el-button type="primary" size="small" @click="storage()">保存</el-button>
+          <el-dropdown  style="margin-left: 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="copyNew()" :disabled="!form.id">复制新增</el-dropdown-item>
+              <el-dropdown-item @click.native="toVoid()" :disabled="form.status < 4 || !form.status">取消发布</el-dropdown-item>
+              <el-dropdown-item @click.native="checkScheduleDialog = true,checkId=form.id" :disabled="form.status < 0 || !form.status">审批流程</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
         </div>
       </div>
     </div>
     <trade-card title="基础资料" style="margin-top: 50px">
-      <avue-form :option="optionForm" v-model="form"></avue-form>
+      <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
     </trade-card>
     <trade-card title="箱信息">
       <avue-crud ref="crudBox" :option="optionBox" :data="dataListBox">
@@ -145,6 +153,7 @@ export default {
   watch: {
     form: {
       handler(newValue, oldValue) {
+        console.log(this.form.status)
         if (this.form.status > 0){
           this.$set(this.optionForm,'disabled',true)
           this.$set(this.optionBox,'addRowBtn',false)
@@ -189,21 +198,36 @@ export default {
           prop: 'releaseTime',
           type: "datetime",
           format: 'yyyy-MM-dd HH:mm',
-          valueFormat: 'yyyy-MM-dd HH:mm:ss'
+          valueFormat: 'yyyy-MM-dd HH:mm:ss',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '截止日期',
           prop: 'deadlineTime',
           type: "datetime",
           format: 'yyyy-MM-dd HH:mm',
-          valueFormat: 'yyyy-MM-dd HH:mm:ss'
+          valueFormat: 'yyyy-MM-dd HH:mm:ss',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '合同号',
           prop: 'contractNo',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '状态',
           disabled:true,
           prop: 'status',
-          dataType: "string",
+          dataType: "number",
           type: 'select',
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=main_bid_status",
           props: {
@@ -219,7 +243,12 @@ export default {
           props: {
             label: "name",
             value: "name"
-          }
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '目的港',
           prop: 'objectiveHarbor',
@@ -229,7 +258,12 @@ export default {
           props: {
             label: "name",
             value: "name"
-          }
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '起运地',
           prop: 'departureLand',
@@ -255,7 +289,12 @@ export default {
           prop: 'loadingTime',
           type: "datetime",
           format: 'yyyy-MM-dd HH:mm',
-          valueFormat: 'yyyy-MM-dd HH:mm:ss'
+          valueFormat: 'yyyy-MM-dd HH:mm:ss',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '是否直航',
           prop: 'directFlight',
@@ -266,7 +305,12 @@ export default {
           }, {
             label: '否',
             value: 0
-          }]
+          }],
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '转港',
           prop: 'transshipment',
@@ -285,13 +329,28 @@ export default {
           props: {
             label: "dictValue",
             value: "dictValue"
-          }
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '运输条款',
           prop: 'transportClause',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '件数',
           prop: 'number',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '包装',
           prop: 'packing',
@@ -300,17 +359,37 @@ export default {
           props: {
             label: "dictValue",
             value: "dictValue"
-          }
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '重量(kgs)',
           prop: 'weight',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '尺码(cmb)',
           prop: 'size',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '货物信息',
           prop: 'cargoInformation',
           span: 18,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "change"
+          }],
         }, {
           label: '备注',
           prop: 'remark',
@@ -343,22 +422,24 @@ export default {
           prop: 'boxAmount',
           cell: true,
           index:2,
-        }, {
-          label: '海运费',
-          prop: 'seaFreight',
-          cell: true,
-          index:3,
-        }, {
-          label: '起运港箱使费',
-          prop: 'departureHarborFee',
-          cell: true,
-          index:4,
-        }, {
-          label: '目的港箱使费',
-          prop: 'objectiveHarborFee',
-          cell: true,
-          index:5,
-        }, {
+        },
+          // {
+        //   label: '海运费',
+        //   prop: 'seaFreight',
+        //   cell: true,
+        //   index:3,
+        // }, {
+        //   label: '起运港箱使费',
+        //   prop: 'departureHarborFee',
+        //   cell: true,
+        //   index:4,
+        // }, {
+        //   label: '目的港箱使费',
+        //   prop: 'objectiveHarborFee',
+        //   cell: true,
+        //   index:5,
+        // },
+          {
           label: '状态',
           prop: 'status',
           type: 'select',
@@ -439,7 +520,7 @@ export default {
         cellBtn: false,
         editBtn: false,
         delBtn: false,
-        menuWidth:100,
+        menuWidth:140,
         column: [{
           label: '名称',
           prop: 'contrastName',
@@ -586,7 +667,7 @@ export default {
         confirmWinningTheBid({id:row.id}).then(res=>{
           this.$message({
             type: 'success',
-            message: '作废成功!'
+            message: '确认中标!'
           });
         })
       }).catch(() => {
@@ -598,33 +679,67 @@ export default {
     },
     // 请核
     pleaseCheck(){
-      this.$confirm('是否确认请核?', '提示', {
+      this.$refs['form'].validate((valid, done) => {
+        if (valid){
+          this.$confirm('是否确认请核?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            let form = {
+              ...this.form,
+              itemsList: this.dataListBox,
+              agentList: this.dataListAgent,
+              contrastList: this.dataListBid
+            }
+            this.fullscreenLoading = true
+            saveSaveList(form).then(res => {
+              const data = {
+                id: res.data.data.id,
+                url: '/bidingDocument/issueTender/index',
+                pageStatus: "this.$store.getters.entranceXsStatus"
+              }
+              confirmPleaseCheck(data).then(res=>{
+                this.fullscreenLoading = false
+                this.$message({
+                  type: 'success',
+                  message: '请核成功!'
+                });
+              })
+            }).finally(() => {
+              this.fullscreenLoading = false
+            })
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消'
+            });
+          });
+        }else {
+          done()
+        }
+      })
+    },
+    // 复制新增
+    copyNew(){
+      this.$confirm('是否确认复制新增?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        let form = {
-          ...this.form,
-          itemsList: this.dataListBox,
-          agentList: this.dataListAgent,
-          contrastList: this.dataListBid
-        }
-        this.fullscreenLoading = true
-        saveSaveList(form).then(res => {
-          const data = {
-            id: res.data.data.id,
-            url: '/bidingDocument/issueTender/index',
-            pageStatus: "this.$store.getters.entranceXsStatus"
-          }
-          confirmPleaseCheck(data).then(res=>{
-            this.fullscreenLoading = false
-            this.$message({
-              type: 'success',
-              message: '请核成功!'
-            });
-          })
-        }).finally(() => {
-          this.fullscreenLoading = false
+        this.form.status = 0
+        this.form.id = ''
+        this.dataListBid = []
+        this.dataListBox.forEach(item => item.id = '')
+        this.dataListAgent.forEach(item => item.id = '')
+        this.$set(this.optionForm,'disabled',false)
+        this.$set(this.optionBox,'addRowBtn',true)
+        this.$set(this.optionAgent,'addRowBtn',true)
+        this.optionBox.column.forEach(item=>{
+          this.$set(item,'disabled',false)
+        })
+        this.optionAgent.column.forEach(item=>{
+          this.$set(item,'disabled',false)
         })
       }).catch(() => {
         this.$message({

+ 0 - 6
src/views/bidingDocument/issueTender/index.vue

@@ -1,12 +1,6 @@
 <template>
   <div>
     <basic-container v-show="!show">
-      <el-input
-          type="textarea"
-          autosize
-          placeholder="请输入内容"
-          v-model="JSON.stringify(option)">
-      </el-input>
       <avue-crud
           :option="option"
           :data="dataList"

+ 0 - 1
src/views/landTransportation/bulkCargo/detailPage.vue

@@ -2101,7 +2101,6 @@ export default {
           prop: 'fleetId',
           type: "select",
           index: 1,
-          cascader: ['plateNo'],
           props: {
             label: "fleetName",
             value: "fleetId"

+ 52 - 3
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -51,10 +51,9 @@
             <el-button type="primary" icon="el-icon-plus" size="small" :disabled="detailData.status == 1"
               @click.stop="addRow">录入明细
             </el-button>
-            <el-button type="success" icon="el-icon-bottom" size="small" @click.stop="getTemplate">下载模板
-            </el-button>
+<!--            <el-button type="success" icon="el-icon-bottom" size="small" @click.stop="getTemplate">下载模板</el-button>-->
             <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1"
-              @click.stop="addRow">导入
+              @click.stop="excelBox = true">导入
             </el-button>
           </template>
           <template slot="oneCode" slot-scope="{ row, index }">
@@ -99,6 +98,22 @@
         </check-schedule>
       </el-dialog>
     </div>
+    <el-dialog title="导入"
+               append-to-body
+               :close-on-click-modal="false"
+               :visible.sync="excelBox"
+               width="555px">
+      <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="getTemplate">
+            点击下载<i class="el-icon-download el-icon--right"></i>
+          </el-button>
+        </template>
+      </avue-form>
+      <p style="text-align: center;color: #DC0505">
+        温馨提示 第一次导入时请先下载模板
+      </p>
+    </el-dialog>
   </div>
 </template>
 
@@ -115,6 +130,32 @@ export default {
   data() {
     return {
       form: {},
+      excelBox:false,
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: '模板下载',
+            prop: 'excelTemplate',
+            formslot: true,
+            span: 24,
+          },{
+            label: '模板上传',
+            prop: 'excelFile',
+            type: 'upload',
+            drag: true,
+            loadText: '模板上传中,请稍等',
+            span: 24,
+            propsHttp: {
+              res: 'data'
+            },
+            tip: '请上传 .xls,.xlsx 标准格式文件',
+            action: "/api/trade-purchase/woodHarvestingCloud/import"
+          }
+        ]
+      },
+      excelForm:{},
       checkScheduleDialog: false,
       tableOption: {},
       option: {
@@ -448,6 +489,14 @@ export default {
     getTemplate() {
       window.open(`/api/trade-purchase/woodHarvestingCloud/export-template?${this.website.tokenHeader}=${getToken()}`)
     },
+    uploadAfter(res, done, loading, column) {
+      res.forEach(item => this.itemsVOList.push({
+        ...item,
+        $cellEdit: true
+      }))
+      this.excelBox = false
+      done();
+    },
     //返回列表
     backToList() {
       let orderFeesList = this.$refs.feeInfo.submitData();