Browse Source

Merge branch 'master' into feature/QueryWater

# Conflicts:
#	dist/index.html
duanxiaoduan 1 year ago
parent
commit
bd8fd8e3b4

File diff suppressed because it is too large
+ 0 - 1
dist/index.html


+ 33 - 4
src/views/console/ranchManagement/index.vue

@@ -36,6 +36,8 @@
         <el-table-column label="牧场编号" min-width="150px" align="center" prop="pastureNumber" />
         <el-table-column label="地图经度" min-width="150px" align="center" prop="longitude" />
         <el-table-column label="地图纬度" min-width="150px" align="center" prop="latitude" />
+        <el-table-column label="供应负责人" min-width="150px" align="center" prop="empname" />
+        <el-table-column label="负责人电话" min-width="150px" align="center" prop="tel" />
         <el-table-column label="备注" min-width="150px" align="center" prop="note" />
         <el-table-column label="顺序" min-width="150px" align="center" prop="sort" />
         <el-table-column label="操作" align="center" width="230" class-name="small-padding fixed-width" fixed="right">
@@ -108,6 +110,22 @@
               </el-form-item>
             </el-col>
           </el-row>
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="供应负责人:" prop="empId">
+                <el-select  v-model="create.temp.empId" filterable placeholder="供应负责人" style="width: 100%;" :disabled="create.dialogStatus =='see'"  @change="changeEmp">
+                  <el-option  v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="负责人电话:" prop="tel">
+                <el-input ref="tel" v-model="create.temp.tel"  disabled style="width: 100%;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
           <el-row>
             <el-col :span="24">
               <el-form-item label="备注:" prop="note">
@@ -145,9 +163,11 @@ export default {
       myHeight:document.documentElement.clientHeight - 85- 200,
       requestParams: [
         { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
-        { name: 'getareaList', offset: 0, pagecount: 0, returntype: 'Map', parammaps: {}}
+        { name: 'getareaList', offset: 0, pagecount: 0, returntype: 'Map', parammaps: {}},
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
       ],
       findAllPasture: [],
+      findAllEmploye: [],
       regionList: [], // 所属区域
       areaIds:[],
       table: {
@@ -174,7 +194,7 @@ export default {
           pastureNumber: [{ required: true, message: '必填', trigger: 'blur' }]
         },
         temp: {
-          areaId: '', pastureName: '', pastureNumber: '', longitude: '', latitude: '', note: '', sort: '',center:''
+          areaId: '', pastureName: '', pastureNumber: '', longitude: '', latitude: '', note: '', sort: '',center:'',empId:'',tel:''
         }
       },
       postDataParam: {},
@@ -193,6 +213,7 @@ export default {
       GetDataByNames(this.requestParams).then(response => {
         this.findAllPasture = response.data.findAllPasture.list
         this.regionList = response.data.getareaList.list
+        this.findAllEmploye = response.data.findAllEmploye.list
         this.regionList.forEach(row => {
           this.areaIds[row.id]= row.name
         });
@@ -225,6 +246,8 @@ export default {
       this.create.temp.note = ''
       this.create.temp.sort = ''
       this.create.temp.center = ''
+      this.create.temp.empId = ''
+      this.create.temp.tel = ''
     },
     form_add() {
       this.resetCreateTemp()
@@ -234,6 +257,10 @@ export default {
         this.$refs['createTemp'].clearValidate()
       })
     },
+    changeEmp(item){
+      console.log(item)
+      this.create.temp.tel = this.findAllEmploye.find(obj => obj.id == item).tel
+    },
     add_dialog_save() {
       this.$refs['createTemp'].validate(valid => {
         if (valid) {
@@ -250,7 +277,8 @@ export default {
             latitude: this.create.temp.latitude,
             note: this.create.temp.note,
             center:this.create.temp.center,
-            companyName: this.create.temp.companyName
+            companyName: this.create.temp.companyName,
+            empId: this.create.temp.empId
           }}
           this.postDataParam.data[1] = { 'name': 'insertPastureDept', 'type': 'e', 'parammaps': {
             pastureName: this.create.temp.pastureName,
@@ -295,7 +323,8 @@ export default {
             latitude: this.create.temp.latitude,
             note: this.create.temp.note,
             id: this.create.temp.id,
-            sort: this.create.temp.sort
+            sort: this.create.temp.sort,
+            empId: this.create.temp.empId
           }}
           this.postDataParam.data[1] = { 'name': 'updateDepartment', 'type': 'e', 'parammaps': {
             dname: this.create.temp.pastureName,

+ 96 - 78
src/views/cost/diesel/index.vue

@@ -28,7 +28,7 @@
           <el-button v-if="isRetreatImport" v-waves class="filter-item" type="warning" icon="el-icon-upload2" @click="form_search">导入</el-button>
         </el-upload>
         <el-button v-if="isDieselExport" v-waves class="filter-item" type="success" icon="el-icon-download" @click="handleDownload">数据导出</el-button>
-        <el-button class="filter-item" type="danger" icon="el-icon-download" @click="form_delete">删除</el-button>
+        <!-- <el-button class="filter-item" type="danger" icon="el-icon-download" @click="form_delete">删除</el-button> -->
       </div>
     </div>
 
@@ -107,7 +107,7 @@
           <el-button v-if="isDieselModify" type="success" size="mini" @click="handleDieselUpdate(row)">编辑</el-button>
           <!-- <el-button type="primary" size="mini" style="width:70px" @click="handleDosageRecord(row)">用量记录</el-button> -->
           <!-- <el-button v-if="isDieselUpdate" type="success" size="mini" @click="handleDieselUpdate(row)">修改</el-button> -->
-          <!-- <el-button v-if="isDieselDel" type="danger" size="mini" @click="handleDieselDel(row)">删除</el-button> -->
+          <el-button v-if="isDieselDel" type="danger" size="mini" @click="handleDieselDel(row)">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -317,7 +317,7 @@
 <script>
 // 引入
 require('script-loader!file-saver')
-import { GetDataByName, GetDataByNames, PostDataByName, checkButtons, ExecDataByConfig, failproccess, GetAccount,getJson } from '@/api/common'
+import { GetDataByName, GetDataByNames, PostDataByName,postJson, checkButtons, ExecDataByConfig, failproccess, GetAccount,getJson } from '@/api/common'
 // import {  DownloadExcel, GetDataByNameXlsx } from '@/api/common'
 import waves from '@/directive/waves'
 import { parseTime, sortChange } from '@/utils/index.js'
@@ -364,7 +364,8 @@ export default {
         parammaps: {
           selTime: '',
           pastureName: Cookies.get('pasturename'),
-          departName: ''
+          departName: '',
+          inputDatetime:''
         }
       },
       // 2-3:下拉框请求后数据加入[]
@@ -482,14 +483,15 @@ export default {
     uploadData() {
       return {
         name: 'importDiesel',
-        importParams: '牧场,油卡编号,设备名称,设备编号,加油日期,加油量(升),单价,录入人,加油人,加油工班,备注',
-        sheetname: 'SheetJS'
+        importParams: '牧场,油卡编号,设备名称,设备编号,加油日期,加油量(升),单价,录入人,加油人,加油工班,备注,柴油类型',
+        sheetname: 'SheetJS',
+        pastureId:Cookies.get('pastureid')
       }
     },
     // 设置上传地址
     uploadExcelUrl() {
       // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+      return process.env.VUE_APP_BASE_API + 'authdata/diese/import/excel'
     }
   },
   created() {
@@ -717,10 +719,10 @@ export default {
             const list1 = response.data.list
             console.log(list1,'list1')
             const tHeader = [
-              '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(升)', '单价', '录入人', '加油人', '加油工班', '备注'
+              '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(升)', '单价', '录入人', '加油人', '加油工班', '备注','柴油类型'
             ]
             const filterVal = [
-              'i', 'pastureName', 'cardNumber', 'assetName', 'assetNumber', 'day', '加油量(L)', '单价', 'name', '加油人', '加油工班', '备注'
+              'i', 'pastureName', 'cardNumber', 'assetName', 'assetNumber', 'day', '加油量(L)', '单价', 'name', '加油人', '加油工班', '备注','柴油类型'
             ]
             const data1 = this.formatJson(filterVal, list1)
             excel.export_json_to_excel({
@@ -764,27 +766,26 @@ export default {
     handleImportExcelSuccess(res, file) {
     //  if (res.msg === 'ok') {
       if (res.msg === 'ok') {
-        this.$message({
-          title: '成功',
-          message: '导入成功:' + res.data.success + '条!',
-          type: 'success',
-          duration: 2000
-        })
         if (res.data.err_count > 0) {
+          this.$message({
+            title: '失败',
+            message: '导入失败',
+            type: 'danger',
+            duration: 2000
+          })
           this.$notify({
             title: '失败',
-            message: '导入失败:' + res.data.err_count + '条!',
+            message: '导入失败',
             type: 'danger',
             duration: 2000
           })
-
            import('@/vendor/Export2Excel').then(excel => {
              const list1 = res.data.result
              const tHeader = [
-               '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(L)', '单价', '录入人', '加油人', '加油工班', '备注', '错误信息'
+               '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(L)', '单价', '录入人', '加油人', '加油工班','柴油类型', '备注', '错误信息'
              ]
              const filterVal = [
-               '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(L)', '单价', '录入人', '加油人', '加油工班', '备注', 'error_msg'
+               '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(L)', '单价', '录入人', '加油人', '加油工班','柴油类型', '备注', 'error_msg'
              ]
              const data1 = this.formatJson(filterVal, list1)
              excel.export_json_to_excel({
@@ -795,6 +796,19 @@ export default {
                bookType: 'xlsx'
              })
            })
+        }else{
+          this.$message({
+            title: '成功',
+            message: '导入成功',
+            type: 'success',
+            duration: 2000
+          })
+          this.$notify({
+            title: '成功',
+            message: '导入成功',
+            type: 'success',
+            duration: 2000
+          })
         }
       } else {
         this.$notify({
@@ -891,6 +905,7 @@ export default {
       this.dialogFormVisible = true
       this.temp.empId = ''
       this.temp.departmentId = ''
+      this.temp.oilType = ''
       this.temp.pastureId = this.$store.state.user.pastureid
       this.$nextTick(() => {
         this.$refs['temp'].clearValidate()
@@ -907,34 +922,32 @@ export default {
             var oilName = this.dieselTypeList.find(obj => obj.value == this.temp.oilType).label
           }
           this.$set(this.temp,'oilName',oilName)
-          this.postDataPramas.common = { 'returnmap': '0' }
-          this.postDataPramas.data = []
-          this.postDataPramas.data[0] = { 'name': 'insertDiesel', 'type': 'e', 'parammaps': {
-            'pastureId': this.temp.pastureId,
-            'selTime': this.temp.selTime,
-            'oilClass': this.temp.oilClass,
-            'oilAmount': this.temp.oilAmount,
-            'eqId': this.temp.eqId,
-            'eqCode': this.temp.eqCode,
-            'departmentId': this.temp.departmentId,
-            'note': this.temp.note,
-            'nowPrice': this.temp.price * this.temp.oilAmount,
-            'oilcardId': this.temp.oilcardId,
-            'cardNumber': this.temp.cardNumber,
-            'price': this.temp.price,
-            'empId': this.temp.empId,
-            'inputId': this.temp.inputId,
-            'oilType':this.temp.oilType,
-            'oilName':this.temp.oilName,
-          }}
-          this.postDataPramas.data[1] = { 'name': 'updateOilCardExecData', 'type': 'e',
-            'parammaps': {
-              'id': this.temp.oilcardId,
-              'nowPrice': this.temp.price * this.temp.oilAmount
-
-            }}
-
-          ExecDataByConfig(this.postDataPramas).then(response => {
+          if(this.temp.eqId == '' || this.temp.eqId == null || this.temp.eqId == undefined){
+            this.temp.eqId = 0
+          }else{
+            this.temp.eqId = parseFloat(this.temp.eqId)
+          }
+          let url = 'authdata/diese/add'
+          let data = {
+            pastureId:this.temp.pastureId,
+            selTime: this.temp.selTime,
+            oilClass:this.temp.oilClass,
+            oilAmount: this.temp.oilAmount,
+            eqId: this.temp.eqId,
+            eqCode: this.temp.eqCode,
+            departmentId: this.temp.departmentId,
+            note: this.temp.note,
+            nowPrice: this.temp.price * this.temp.oilAmount,
+            oilcardId: this.temp.oilcardId,
+            cardNumber: this.temp.cardNumber,
+            price: this.temp.price,
+            empId: this.temp.empId,
+            inputId: this.temp.inputId,
+            oilType:this.temp.oilType,
+            oilName:this.temp.oilName,
+          }
+          postJson(url,data).then(response => {
+          // ExecDataByConfig(this.postDataPramas).then(response => {
             if (response.msg === 'fail') {
               this.$notify({
                 title: '保存失败',
@@ -969,35 +982,31 @@ export default {
             var oilName = this.dieselTypeList.find(obj => obj.value == this.temp.oilType).label
           }
           this.$set(this.temp,'oilName',oilName)
-          this.postDataPramas.common = { 'returnmap': '0' }
-          this.postDataPramas.data = []
-          this.postDataPramas.data[0] = { 'name': 'insertDiesel', 'type': 'e', 'parammaps': {
-
-            'pastureId': this.temp.pastureId,
-            'selTime': this.temp.selTime,
-            'oilClass': this.temp.oilClass,
-            'oilAmount': this.temp.oilAmount,
-            'eqId': this.temp.eqId,
-            'eqCode': this.temp.eqCode,
-            'departmentId': this.temp.departmentId,
-            'note': this.temp.note,
-            'nowPrice': this.temp.price * this.temp.oilAmount,
-            'oilcardId': this.temp.oilcardId,
-            'cardNumber': this.temp.cardNumber,
-            'price': this.temp.price,
-            'empId': this.temp.empId,
-            'inputId': this.temp.inputId,
-            'oilType':this.temp.oilType,
-            'oilName':this.temp.oilName,
-          }}
-
-          this.postDataPramas.data[1] = { 'name': 'updateOilCardExecData', 'type': 'e',
-            'parammaps': {
-              'id': this.temp.oilcardId,
-              'nowPrice': this.temp.price * this.temp.oilAmount
-            }}
-
-          ExecDataByConfig(this.postDataPramas).then(response => {
+          if(this.temp.eqId == '' || this.temp.eqId == null || this.temp.eqId == undefined){
+            this.temp.eqId = 0
+          }else{
+            this.temp.eqId = parseFloat(this.temp.eqId)
+          }
+          let url = 'authdata/diese/add'
+          let data = {
+            pastureId:this.temp.pastureId,
+            selTime: this.temp.selTime,
+            oilClass:this.temp.oilClass,
+            oilAmount: this.temp.oilAmount,
+            eqId: this.temp.eqId,
+            eqCode: this.temp.eqCode,
+            departmentId: this.temp.departmentId,
+            note: this.temp.note,
+            nowPrice: this.temp.price * this.temp.oilAmount,
+            oilcardId: this.temp.oilcardId,
+            cardNumber: this.temp.cardNumber,
+            price: this.temp.price,
+            empId: this.temp.empId,
+            inputId: this.temp.inputId,
+            oilType:this.temp.oilType,
+            oilName:this.temp.oilName,
+          }
+          postJson(url,data).then(response => {
             if (response.msg !== 'fail') {
               this.form_reset()
               this.$nextTick(() => {
@@ -1010,7 +1019,12 @@ export default {
                 duration: 2000
               })
             } else {
-              failproccess(response, this.$notify)
+              this.$notify({
+                title: '保存失败',
+                message: response.data,
+                type: 'warning',
+                duration: 2000
+              })
             }
           })
         }
@@ -1095,7 +1109,11 @@ export default {
           this.requestParam.name = 'deleteDiesel'
           this.requestParam.parammaps = {}
           this.requestParam.parammaps['id'] = row.id
-          PostDataByName(this.requestParam).then(() => {
+          let url = 'authdata/diese/off'
+          let data = {
+            id:parseInt(row.id),
+          }
+          postJson(url,data).then(response => {
             this.get_table_data()
             this.dialogFormVisible = false
             this.$notify({

+ 23 - 14
src/views/custom/contractManagement/index.vue

@@ -136,7 +136,8 @@
             <el-table-column label="计量单位" min-width="120px" align="center" prop="unit" />
             <el-table-column label="计划量" sortable min-width="120px" align="center" prop="planAmount" />
             <el-table-column label="单价" sortable min-width="120px" align="center" prop="price" />
-            <el-table-column label="备注" min-width="120px" align="center" prop="remark" />
+            <!-- <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
+            <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" /> -->
           </el-table>
           <pagination v-show="tab1.detailsSpareParts.total>0" :total="tab1.detailsSpareParts.total" :page.sync="tab1.detailsSpareParts.getdataListParm.offset" :limit.sync="tab1.detailsSpareParts.getdataListParm.pagecount" @pagination="getTab1List2" />
         </div>
@@ -535,16 +536,16 @@
               <el-input v-model="scope.row.price" />
             </template>
           </el-table-column>
-          <el-table-column label="税码" min-width="80px" align="center" valign="middle">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.taxcode" />
-            </template>
-          </el-table-column>
-          <el-table-column label="备注" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.remark" type="textarea" placeholder="备注" autosize maxlength="100" show-word-limit />
-            </template>
-          </el-table-column>
+          <!-- <el-table-column label="使用周期" min-width="110px" align="center" valign="middle">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.lifeCycle" />
+              </template>
+            </el-table-column>
+            <el-table-column label="合同差异项" min-width="110px" align="center" valign="middle">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.contractVarianceItem" />
+              </template>
+            </el-table-column> -->
           <el-table-column label="操作" align="center" width="100px" class-name="small-padding fixed-width" fixed="right">
             <template slot-scope="{row}">
               <a class="del" :disabled="isokDisable" @click="partDelete(row)">删除</a>
@@ -2198,7 +2199,9 @@ export default {
           remark: '@insertSpotList.remark',
           unit: '@insertSpotList.unit',
           contractId: '@insertSpotList.contractId',
-          taxcode: '@insertSpotList.taxcode'
+          taxcode: '@insertSpotList.taxcode',
+          // lifeCycle: '@insertSpotList.lifeCycle',
+          // contractVarianceItem: '@insertSpotList.contractVarianceItem',
         }}
         ExecDataByConfig(this.postDataPramas).then(response => {
           console.log('新增保存发送参数', this.postDataPramas)
@@ -2287,7 +2290,9 @@ export default {
           remark: '@insertSpotList.remark',
           unit: '@insertSpotList.unit',
           contractId: '@insertSpotList.contractId',
-          taxcode: '@insertSpotList.taxcode'
+          taxcode: '@insertSpotList.taxcode',
+          // lifeCycle: '@insertSpotList.lifeCycle',
+          // contractVarianceItem: '@insertSpotList.contractVarianceItem',
         }}
         ExecDataByConfig(this.postDataPramas).then(response => {
           console.log('新增保存发送参数', this.postDataPramas)
@@ -2584,7 +2589,9 @@ export default {
               remark: '@insertSpotList.remark',
               unit: '@insertSpotList.unit',
               contractId: '@insertSpotList.contractId',
-              taxcode: '@insertSpotList.taxcode'
+              taxcode: '@insertSpotList.taxcode',
+              // lifeCycle: '@insertSpotList.lifeCycle',
+              // contractVarianceItem: '@insertSpotList.contractVarianceItem',
             }}
           } else {
             this.postDataPramas.data[1].children[0] = { 'name': 'checkcontracPartCode', 'type': 'v', 'parammaps': { pastureId: this.tab1.detailsSpareParts.detailsList.pastureId, providerId: this.tab1.detailsSpareParts.detailsList.providerId, stopTime: this.tab1.detailsSpareParts.detailsList.stopTime, flag: this.tab1.detailsSpareParts.detailsList.flag, isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock, statue: this.tab1.detailsSpareParts.detailsList.statue, partCode: '@insertSpotList.partCode', brandId: '@insertSpotList.brandId' }}
@@ -2603,6 +2610,8 @@ export default {
               remark: '@insertSpotList.remark',
               unit: '@insertSpotList.unit',
               contractId: '@insertSpotList.contractId',
+              // lifeCycle: '@insertSpotList.lifeCycle',
+              // contractVarianceItem: '@insertSpotList.contractVarianceItem',
               // taxcode: '@insertSpotList.taxcode'
             }}
           }

+ 37 - 3
src/views/custom/outStock/index.vue

@@ -6,6 +6,8 @@
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="备件出库" name="first">
+        <!-- <div class="el-icon-info" style="font-size: 30px;float: right;color: #009C69;" @click="handleDescription" /> -->
+        <div class="el-icon-info" style="font-size: 30px;float: right;color: #409EFF;" @click="handleDescription"/>
         <div class="filter-container">
           <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="changePastureName">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
@@ -1021,6 +1023,24 @@
         <el-button @click="easStatus.dialogFormVisible = false;get_table_data()">关闭</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog :title="textMap[description.dialogStatus]" :destroy-on-close="true" :visible.sync="description.dialogFormVisible" :close-on-click-modal="false" width="70%">
+        <b style="line-height: 28px;">常见问题1:出库保存报错</b>
+        <br>
+      <div class="app-description dialogMinHeight">
+        <div class="content">
+          报错原因1: 请求超时
+          <br>
+          报错原因2:牧场在SAP已出库
+          <br>
+          解决方案:请在SAP冲销相应的未同步的出库。
+          <br>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button class="cancelClose" @click="description.dialogFormVisible = false; ">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -1167,7 +1187,8 @@ export default {
         see: '查看详情',
         update: '编辑',
         create: '新增',
-        easStatus: 'EAS同步—同步失败数据'
+        easStatus: 'EAS同步—同步失败数据',
+        description: '常见问题说明'
       },
       getdataListParm: {
         name: 'getBigPartuseList',
@@ -1333,7 +1354,11 @@ export default {
             pastureid: Cookies.get('pastureid')
           }
         }
-      }
+      },
+      description: {
+        dialogFormVisible: false,
+        dialogStatus: ''
+      },
     }
   },
   computed: {
@@ -3259,8 +3284,11 @@ export default {
       }).catch(() => {
         this.$message({ type: 'info', message: '已取消忽略同步' })
       })
+    },
+    handleDescription() {
+      this.description.dialogStatus = 'description'
+      this.description.dialogFormVisible = true
     }
-
   }
 }
 </script>
@@ -3288,5 +3316,11 @@ export default {
   .el-form-item__content{
     line-height: 0;
   }
+  .app-description{
+    display:flex; justify-content: left; align-items: left;font-size: 14px;line-height: 28px;height: 300px;
+    .content{
+      display:flex;
+    }
+  }
 
 </style>

+ 226 - 32
src/views/custom/subscribe/index.vue

@@ -26,7 +26,7 @@
       <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
       <div>
 
-        <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
+        <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="apply_subscribe">新增</el-button>
         <el-button v-if="isSubscribeSpecial" class="filter-item" type="primary" icon="el-icon-edit" @click="handle_specialSubscription">特殊申购</el-button>
         <el-button v-if="isSubscribeExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
         <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
@@ -228,6 +228,7 @@
                   :fetch-suggestions="sparePartSearch"
                   placeholder="请输入备件编号或备件名称或备件规格"
                   style="width:100%"
+                  ref="autocomplete"
                   @select="handleSelectSparePart"
                 >
                   <template slot-scope="{ item }">
@@ -329,6 +330,8 @@
               <el-input v-model="scope.row.purpose" />
             </template>
           </el-table-column>
+          <!-- <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
+          <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" /> -->
           <el-table-column
             label="操作"
             align="center"
@@ -386,8 +389,8 @@
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item label="申购日期:" prop="createTime">
-                <el-date-picker v-model="seeTemp.createTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
+              <el-form-item label="申购日期:" prop="inputTime">
+                <el-date-picker v-model="seeTemp.inputTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
               </el-form-item>
             </el-col>
             <el-col :span="8" v-if="seeTemp.purchaseType == '2'">
@@ -472,11 +475,9 @@
           <el-table-column label="现有库存" sortable prop="storageAmount" align="center" min-width="60" />
           <el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
           <el-table-column label="申购数量" sortable prop="amount" align="center" min-width="60" />
-          <el-table-column label="备注" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.purpose }}</span>
-            </template>
-          </el-table-column>
+          <!-- <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
+          <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" /> -->
+          <el-table-column label="备注" min-width="110px" align="center" prop="purpose" />
         </el-table>
         <el-form
           ref="seeTemp"
@@ -570,6 +571,56 @@
     </el-dialog>
 
 
+    <!-- 查看备件 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_seepart" :close-on-click-modal="false" width="90%">
+      <div>
+        <el-input v-model="seepart.getdataListParm.parammaps.partName" placeholder="备件" style="width: 200px;" class="filter-item" />
+        <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="seepart_search">搜索</el-button>
+        <h3 v-if="seepartList.length == 0" style="text-align: center;height: 300px;line-height:300px;">呆滞库存查询(如可调拨使用,请优先消耗)</h3>
+        <div v-else>
+          <el-table
+            :key="seepart.tableKey"
+            v-loading="seepart.listLoading"
+            element-loading-text="给我一点时间"
+            :data="seepartList"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;margin-bottom:30px;margin-top:20px;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable"
+            height="300"
+          >
+            <el-table-column label="序号" align="center" type="index" width="50px" />
+            <el-table-column label="牧场名称" prop="pastureName" align="center" min-width="90" />
+            <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
+            <el-table-column label="备件名称" prop="partName" align="center" min-width="90" />
+            <el-table-column label="备件规格" prop="specification" align="center" min-width="90" />
+            <el-table-column label="备件图片" prop="picpath" align="center" min-width="90">
+            <template slot-scope="scope">
+                <el-popover placement="right" title="" trigger="hover">
+                  <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                  <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                </el-popover>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件品牌" prop="brand" align="center" min-width="90" />
+            <el-table-column label="计量单位" prop="unit" align="center" min-width="90" />
+            <el-table-column label="现有库存" sortable prop="reportery" align="center" min-width="60" />
+            <el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
+            <el-table-column label="在库天数" sortable prop="daysInStorage" align="center" min-width="60" />
+            <el-table-column label="负责人" prop="dutyPersonal" align="center" min-width="90" />
+            <el-table-column label="联系方式" prop="telphone" align="center" min-width="90" />
+          </el-table>
+          <pagination v-show="seepart.total>0" :total="seepart.total" :page.sync="seepart.getdataListParm.offset" :limit.sync="seepart.getdataListParm.pagecount" @pagination="get_seepart_data" />
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="form_add()">继续申购</el-button>
+        <el-button @click="dialogFormVisible_seepart = false;">取消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -616,13 +667,14 @@ export default {
       textMap: {
         update: '编辑',
         create: '新增',
-        see: '查看/特殊申购l',
+        see: '查看',
         examine1: '审核1',
         examine2: '审核2',
         examine3: '审核3',
         examine4: '审核4',
         examine5: '审核5',
-        special: '特殊申购'
+        special: '特殊申购',
+        seepart:'备件申购'
       },
       rules: {
         equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
@@ -736,6 +788,22 @@ export default {
         }
       },
       providerList:[],
+      dialogFormVisible_seepart:false,
+      seepartList:[],
+      seepart:{
+        tableKey: 0,
+        listLoading: true,
+        total: 0,
+        getdataListParm: {
+          page: 1, offset: 1, pagecount: 10,
+          name:'getIdleSpareParts',
+          parammaps:{
+            partName:''
+          }
+        }
+      },
+      apply_subscribeData:{},
+      isApplyEx4:true,
       myHeight:document.documentElement.clientHeight - 85- 150
     }
   },
@@ -983,6 +1051,7 @@ export default {
       this.getCreateDepartDownList()
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
+      this.dialogFormVisible_seepart = false
       this.$nextTick(() => {
         this.$refs['createTemp'].clearValidate()
       })
@@ -1049,6 +1118,37 @@ export default {
       if(this.dialogStatus==='special' && this.createTemp.purchaseType == '1' && this.createTemp.providerId == ''){
         this.createTemp.providerId = item.providerId
       }
+      this.public_select(item)
+    },
+    apply_subscribe(){
+      this.dialogStatus = 'seepart'
+      this.seepartList = []
+      console.log(this.seepartList.length,'===')
+      this.dialogFormVisible_seepart = true
+      // this.apply_subscribeData = item
+    },
+    seepart_search(){
+      this.get_seepart_data()
+    },
+    get_seepart_data() {
+      this.seepart.listLoading = true
+      GetDataByName(this.seepart.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('table数据', response.data.list)
+          this.seepartList = response.data.list
+          this.seepart.pageNum = response.data.pageNum
+          this.seepart.pageSize = response.data.pageSize
+        } else {
+          this.seepartList = []
+        }
+        this.seepart.total = response.data.total
+
+        setTimeout(() => {
+          this.seepart.listLoading = false
+        }, 100)
+      })
+    },
+    public_select(item){
       if (this.createTemp.providerId == '') {
         if (this.listAdd.length > 0) {
           if (this.listAdd.find(obj => obj.partId == item.partId)) {
@@ -1145,7 +1245,7 @@ export default {
         }
         this.$forceUpdate()
       }
-      console.log(this.listAdd,'this.listAdd')
+
     },
     add_dialog_save() {
       this.isokDisable = true
@@ -1190,12 +1290,13 @@ export default {
               return false
             } else {
               if (parseFloat(this.listAdd[j].price) == 0) {
-                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                 return false
               } else {
-                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
                 if (rulesPrice.test(this.listAdd[j].price) == false) {
-                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                   return false
                 }
               }
@@ -1286,6 +1387,12 @@ export default {
     },
     // 查看
     form_see(row) {
+      // 查看/特殊申购
+      if(row.purchase_type == 1 || row.purchase_type == 3){
+        this.textMap.see = '特殊申购'
+      }else{
+        this.textMap.see = '查看'
+      }
       this.dialogStatus = 'see'
       this.dialogFormVisibleSee = true
       this.seeTemp = Object.assign({}, row)
@@ -1293,13 +1400,14 @@ export default {
       console.log('查看上方数据(从table读取)', this.seeTemp)
       this.listSee = []
       this.getdataListSee.parammaps.id = this.seeTemp.id
+      this.isApplyEx4 = false
       this.getSeeList()
+    },
+    getFlowPath(){
       // 流程图
       var reason = '未通过原因:' + this.seeTemp.workflowNote
-
-
-
       if (this.seeTemp.purchase_type < 0 || this.seeTemp.purchase_type == 0 ) {
+        if(this.isApplyEx4 == true){
           if (this.seeTemp.statue === 2) {
             this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' }]
             this.active = 1
@@ -1322,8 +1430,8 @@ export default {
             this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '场长审核' }, { title: '采购审核' }]
             this.active = 4
           }  else if (this.seeTemp.statue === 11) {
-            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson   }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
-            this.active = 5
+              this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson   }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
+              this.active = 5
           } else if (this.seeTemp.statue === 12) {
             this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson  }, { title: '场长审核' , date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, status: 'error', reason: reason }, { title: '采购审核' }]
             this.active = 5
@@ -1335,11 +1443,46 @@ export default {
             this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
             this.active = 6
           }
+        }else{
+          if (this.seeTemp.statue === 2) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '采购审核' }]
+            this.active = 1
+          } else if (this.seeTemp.statue === 3) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' },  { title: '采购审核' }]
+            this.active = 2
+          } else if (this.seeTemp.statue === 4) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
+            this.active = 2
+          } else if (this.seeTemp.statue === 9) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' }, { title: '采购审核' }]
+            this.active = 3
+          } else if (this.seeTemp.statue === 10) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason  }, { title: '供应主管审核' }, { title: '采购审核' }]
+            this.active = 3
+          }  else if (this.seeTemp.statue === 5) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson   }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
+            this.active = 4
+          } else if (this.seeTemp.statue === 6) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason },  { title: '采购审核' }]
+            this.active = 4
+          }  else if (this.seeTemp.statue === 11) {
+              this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson   }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
+              this.active = 4
+          } else if (this.seeTemp.statue === 12) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson  }, { title: '采购审核' }]
+            this.active = 4
+          } else if (this.seeTemp.statue === 7) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
+            this.active = 6
+          } else if (this.seeTemp.statue === 8) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
+            this.active = 6
+          }
+        }
       } else if(this.seeTemp.purchase_type == 3){
         this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }]
         this.active = 1
       }else {
-        // 待写
         if (this.seeTemp.statue === 2) {
           this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '财务审核' },{ title: '场长审核' },{ title: '采购审核' }]
           this.active = 1
@@ -1381,15 +1524,44 @@ export default {
           this.active = 7
         }
       }
-
-
     },
     getSeeList() {
+      this.listLoadingSee = true
       GetDataByName(this.getdataListSee).then(response => {
         if (response.data.list !== null) {
           console.log('查看下方table数据', response.data.list)
           this.listSee = response.data.list
           this.listAdd = response.data.list
+          var sumPrices = 0
+          response.data.list.forEach(function(i,j){
+            sumPrices = sumPrices + (parseFloat(i.price1) *parseFloat(i.amount) )
+          })
+          console.log("总价sumPrices",sumPrices)
+          var priceObj = false
+          var priceArr = []
+          response.data.list.forEach(function(i,j){
+            if(parseFloat(i.price1) >= 500){
+              priceArr.push(true)
+            }else{
+              priceArr.push(false)
+            }
+          })
+
+          if (priceArr.includes(true)) {
+            priceObj = true
+          } else {
+            priceObj = false
+          }
+          console.log("priceObj",priceObj)
+          //总价大于2000 或单价>500
+          if(sumPrices >= 2000 || priceObj){
+            this.isApplyEx4 = true
+            this.getFlowPath()
+          } else {
+            this.isApplyEx4 = false
+            this.getFlowPath()
+          }
+
           for (let i = 0; i < response.data.list.length; i++) {
             if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
               console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath, '=======1')
@@ -1406,8 +1578,6 @@ export default {
               this.listAdd[i].srcpath = ''
               this.listAdd[i].picpath = ''
             }
-            console.log(process.env.VUE_APP_BASE_API)
-            console.log(this.listSee, '============')
           }
         }
         if (response.data.total) {
@@ -1467,12 +1637,13 @@ export default {
               return false
             } else {
               if (parseFloat(this.listAdd[j].price) == 0) {
-                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                 return false
               } else {
-                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
                 if (rulesPrice.test(this.listAdd[j].price) == false) {
-                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                   return false
                 }
               }
@@ -1768,17 +1939,21 @@ export default {
         this.examineTemp = this.seeTemp
         this.$set(this.seeTemp, 'statue', 1)
         this.$set(this.seeTemp, 'workflowNote', '')
+        this.getdataListSee.parammaps.id = this.seeTemp.id
       } else {
         this.examineTemp = Object.assign({}, row)
+        this.getdataListSee.parammaps.id = this.examineTemp.id
         this.$set(this.examineTemp, 'statue', 1)
         this.$set(this.examineTemp, 'workflowNote', '')
       }
+      this.getSeeList()
       this.dialogStatus = 'examine3'
       this.dialogFormVisible_Examine = true
       this.statueReason = false
     },
     createExamineData3() {
       console.log('点击了供应主管审核')
+      console.log(this.isApplyEx4,'=====')
       this.isokDisable = true
       setTimeout(() => {
         this.isokDisable = false
@@ -1790,12 +1965,30 @@ export default {
           this.requestParam.parammaps = {}
           this.requestParam.parammaps.id = this.examineTemp.id
           if (this.examineTemp.statue == 1) {
-            this.requestParam.parammaps.statue = 5
+            if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
+              console.log(this.isApplyEx4,'=====')
+              if(this.isApplyEx4 == true){
+                this.requestParam.parammaps.statue = 5
+              }else{
+                this.requestParam.parammaps.statue = 11
+              }
+            }else{
+              this.requestParam.parammaps.statue = 5
+            }
           } else if (this.examineTemp.statue == 2) {
-            this.requestParam.parammaps.statue = 6
+            if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
+              if(this.isApplyEx4 == true){
+                this.requestParam.parammaps.statue = 6
+              }else{
+                this.requestParam.parammaps.statue = 12
+              }
+            }else{
+              this.requestParam.parammaps.statue = 6
+            }
           }
           this.requestParam.parammaps.empId	 = Cookies.get('employeid')
           this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          // return false
           PostDataByName(this.requestParam).then(response => {
             console.log('审核确认发送参数', this.requestParam)
             this.isokDisable = false
@@ -2074,12 +2267,13 @@ export default {
                 return false
               } else {
                 if (parseFloat(this.listAdd[j].price) == 0) {
-                  this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                  this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                   return false
                 } else {
-                  var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                  // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                  var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
                   if (rulesPrice.test(this.listAdd[j].price) == false) {
-                    this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                    this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                     return false
                   }
                 }

+ 7 - 7
src/views/maintenance/maintain/index.vue

@@ -181,7 +181,7 @@
                 <!-- <el-form-item label="保养人:" prop="upkeepPerson">
                   <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
                 </el-form-item> -->
-                <el-form-item label="保养人:" prop="useEmpName">
+                <el-form-item label="机修 :" prop="useEmpName">
                   <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
                 </el-form-item>
               </el-col>
@@ -194,7 +194,7 @@
                 <!-- <el-form-item label="使用人:" prop="useEmpName">
                   <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
                 </el-form-item> -->
-                <el-form-item label="使用人:" prop="upkeepPerson">
+                <el-form-item label="保养人:" prop="upkeepPerson">
                   <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
                 </el-form-item>
               </el-col>
@@ -1375,10 +1375,10 @@ export default {
         return '审核中'
       } else if (cellValue.SHStatue == 4) {
         return '未通过'
- 
+
       } else if (cellValue.SHStatue == 8) {
         return '未通过'
-    
+
       } else if (cellValue.SHStatue == 7) {
         return '已通过'
       }
@@ -1402,7 +1402,7 @@ export default {
       if (this.seeTemp.SHStatue === 1) {
         this.activeList = [{ title: '保养人审核' }, { title: '机修审核' },   { title: '设备主管审核' }]
         this.active = 0
-        
+
       } else if (this.seeTemp.SHStatue === 2) {
         this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核' },  { title: '设备主管审核' }]
         this.active = 1
@@ -1413,7 +1413,7 @@ export default {
       } else if (this.seeTemp.SHStatue === 4) {
         this.active = 2
         this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
-        
+
 
       } else if (this.seeTemp.SHStatue === 7) {
         this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },  { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
@@ -1842,7 +1842,7 @@ export default {
               }
 
 
-              
+
 
 
             } else {

Some files were not shown because too many files changed in this diff