Browse Source

修改挤奶处和显示错误提示

Shan9312 10 months ago
parent
commit
5a2a26ce4a
6 changed files with 1984 additions and 764 deletions
  1. 0 0
      dist/index.html
  2. 16 24
      src/api/common.js
  3. 11 11
      src/permission.js
  4. 688 115
      src/views/asset/basics/index.vue
  5. 114 145
      src/views/custom/outStock/index.vue
  6. 1155 469
      src/views/custom/subscribe/index.vue

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


+ 16 - 24
src/api/common.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 import parseTime from '@/utils/index.js'
 
-export function postJson(url,data) {
+export function postJson(url, data) {
   return request({
     url: process.env.VUE_APP_BASE_API + url,
     method: 'post',
@@ -10,7 +10,6 @@ export function postJson(url,data) {
   })
 }
 
-
 export function partslistSGv2(data) {
   return request({
     url: '/authdata/partslistSGv2',
@@ -19,8 +18,6 @@ export function partslistSGv2(data) {
   })
 }
 
-
-
 export function startStopRecord(data) {
   return request({
     url: '/authdata/startStopRecord',
@@ -29,7 +26,6 @@ export function startStopRecord(data) {
   })
 }
 
-
 export function GetDataByName(data) {
   return request({
     url: '/authdata/GetDataByName',
@@ -85,7 +81,6 @@ export function EasSync(data) {
   })
 }
 
-
 export function SapTrans(data) {
   return request({
     url: '/authdata/sap/transfer/send',
@@ -118,7 +113,6 @@ export function SapUse(data) {
   })
 }
 
-
 export function SapLaid(data) {
   return request({
     url: '/authdata/sap/laidproof/send',
@@ -127,7 +121,6 @@ export function SapLaid(data) {
   })
 }
 
-
 export function SapOrder(data) {
   return request({
     url: '/authdata/sap/order/send',
@@ -136,7 +129,6 @@ export function SapOrder(data) {
   })
 }
 
-
 export function SrmOrder(data) {
   return request({
     url: '/authdata/srm/order/send',
@@ -191,9 +183,9 @@ export function removeimage(data) {
     data
   })
 }
-export function getJson(url,data) {
+export function getJson(url, data) {
   return request({
-    url:  url + data,
+    url: url + data,
     method: 'get'
   })
 }
@@ -213,7 +205,8 @@ export function downloadmailreport(data) {
   })
 }
 
-export function failproccess(data, notify) {
+export function failproccess(data, notify, num) {
+  console.log(data, 'failproccess-闪闪')
   if (data.data.includes('Duplicate')) {
     notify({
       title: '失败',
@@ -224,7 +217,7 @@ export function failproccess(data, notify) {
   } else {
     notify({
       title: '失败',
-      message: '数据存在错误,请校验好重新录入,不可以录入数据',
+      message: num && num == 1 ? data.data : '数据存在错误,请校验好重新录入,不可以录入数据', // '数据存在错误,请校验好重新录入,不可以录入数据',
       type: 'error',
       duration: 2000
     })
@@ -268,7 +261,6 @@ export function updateAndInster(data) {
   })
 }
 
-
 export function transData(a, idStr, pidStr, chindrenStr) {
   var r = []; var hash = {}; var id = idStr; var pid = pidStr; var children = chindrenStr; var i = 0; var j = 0; var len = a.length
   for (; i < len; i++) {
@@ -326,14 +318,14 @@ export function DownloadExcel(data, filename) {
   }
 }
 // 用于获取本月或指定月份的最后一天
-export function getMonthFinalDay(year,month){
-	var day='';
-	if(year==null || year==undefined || year==''){
-		year = new Date().getFullYear();
-	}
-	if(month==null ||  month==undefined || month==''){
-		month = new Date().getMonth()+1;
-	}
-	day = new Date(new Date(year,month).setDate(0)).getDate();
-	return year+"-"+month+"-"+day;
+export function getMonthFinalDay(year, month) {
+  var day = ''
+  if (year == null || year == undefined || year == '') {
+    year = new Date().getFullYear()
+  }
+  if (month == null || month == undefined || month == '') {
+    month = new Date().getMonth() + 1
+  }
+  day = new Date(new Date(year, month).setDate(0)).getDate()
+  return year + '-' + month + '-' + day
 }

+ 11 - 11
src/permission.js

@@ -3,11 +3,11 @@ import store from './store'
 import { Message } from 'element-ui'
 import NProgress from 'nprogress' // progress bar
 import 'nprogress/nprogress.css' // progress bar style
-import { getToken,removeToken } from '@/utils/auth' // get token from cookie
+import { getToken, removeToken } from '@/utils/auth' // get token from cookie
 import Cookies from 'js-cookie'
 import getPageTitle from '@/utils/get-page-title'
 // 1为单点登录,其他不是
-Cookies.set('sso',0)
+Cookies.set('sso', 0)
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
 const whiteList = ['/login'] // no redirect whitelist
@@ -22,7 +22,7 @@ router.beforeEach(async(to, from, next) => {
   // determine whether the user has logged in
   const hasToken = getToken()
 
-    console.log('hasToken==>',hasToken)
+  console.log('hasToken==>', hasToken)
   if (hasToken) {
     if (to.path === '/login') {
       // if is logged in, redirect to the home page
@@ -43,7 +43,7 @@ router.beforeEach(async(to, from, next) => {
 
           // generate accessible routes map based on roles
           const accessRoutes = await store.dispatch('permission/generateRoutes', roles)
-          console.log(accessRoutes,'accessRoutes')
+          console.log(accessRoutes, 'accessRoutes')
           // dynamically add accessible routes
           router.addRoutes(accessRoutes)
 
@@ -75,19 +75,19 @@ router.beforeEach(async(to, from, next) => {
 
       next({ path: '/login' })
       NProgress.done()
-      if(Cookies.get('sso') == 1){
+      if (Cookies.get('sso') == 1) {
         // 单点登录
         // 构建要跳转的URL
         var url = process.env.VUE_APP_BASE_API
-        console.log(url,'url')
-        //获取当前url
-        if(url.indexOf('/')==0 && url.length==1){
-          url= window.location.protocol + "//"+window.location.host+url
+        console.log(url, 'url')
+        // 获取当前url
+        if (url.indexOf('/') == 0 && url.length == 1) {
+          url = window.location.protocol + '//' + window.location.host + url
         }
-        const externalURL = "https://id.xiandaimuye.com/api/v1/oauth2/authorize?response_type=code&client_id=fTBm64I4k3kqHYtoFTUpvirCDxxCfx7I&redirect_uri="+url+'api/v1/oauth2/token';
+        const externalURL = 'https://id.xiandaimuye.com/api/v1/oauth2/authorize?response_type=code&client_id=fTBm64I4k3kqHYtoFTUpvirCDxxCfx7I&redirect_uri=' + url + 'api/v1/oauth2/token'
         // 使用 $router.push 进行页面跳转
         // 注意: 这里的跳转是在当前窗口进行的,如果需要在新标签页打开,可以使用 window.open(externalURL)
-        window.open(externalURL, "_self");
+        window.open(externalURL, '_self')
       }
     }
   }

File diff suppressed because it is too large
+ 688 - 115
src/views/asset/basics/index.vue


+ 114 - 145
src/views/custom/outStock/index.vue

@@ -7,7 +7,7 @@
     <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="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" />
@@ -49,7 +49,7 @@
             <!-- <el-button class="filter-item" style="margin-left: 10px;" type="danger" icon="el-icon-upload2" @click="handleDownloadEas">导出EAS</el-button> -->
             <!-- <el-button class="filter-item" style="margin-left: 10px;" type="danger" icon="el-icon-upload2" @click="handleDownloadEas1">导出EAS</el-button> -->
             <!-- <el-button v-if="isEasSynchronization" class="filter-item" type="primary" style="float: right;" @click="handleEAS">EAS同步</el-button> -->
-            <el-button v-if="isOutsap"  class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
+            <el-button v-if="isOutsap" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
           </div>
         </div>
         <el-table
@@ -64,12 +64,12 @@
           :row-style="rowStyle"
           :cell-style="cellStyle"
           class="elTable table-fixed"
+          :max-height="myHeight"
           @sort-change="tableSort"
           @selection-change="change_table_selection"
           @current-change="handleCurrentChange"
-          :max-height="myHeight"
         >
-        <el-table-column type="selection" :selectable="checkboxInit" align="center" width="50" />
+          <el-table-column type="selection" :selectable="checkboxInit" align="center" width="50" />
           <el-table-column label="序号" align="center" type="index" width="50px">
             <template slot-scope="scope">
               <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
@@ -107,25 +107,25 @@
               <span>{{ scope.row.easStatus }}</span><br>
             </template>
           </el-table-column> -->
-          <el-table-column  prop="ProofCode" label="sap编码" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{scope.row.ProofCode}}</span>
-              </template>
-            </el-table-column>
-          <el-table-column   prop="ProofCode" label="sap上传状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.ProofCode">已上传</span>
-                <span v-else>未上传</span>
-
-              </template>
-            </el-table-column>
-            <el-table-column   prop="sterilisation" label="冲销状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.sterilisation == 1">已冲销</span>
-                <span v-else-if="scope.row.sterilisation == 2">部分冲销</span>
-                <span v-else>未冲销</span>
-              </template>
-            </el-table-column>
+          <el-table-column prop="ProofCode" label="sap编码" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.ProofCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="ProofCode" label="sap上传状态" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.ProofCode">已上传</span>
+              <span v-else>未上传</span>
+
+            </template>
+          </el-table-column>
+          <el-table-column prop="sterilisation" label="冲销状态" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.sterilisation == 1">已冲销</span>
+              <span v-else-if="scope.row.sterilisation == 2">部分冲销</span>
+              <span v-else>未冲销</span>
+            </template>
+          </el-table-column>
 
           <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
             <template slot-scope="{row}">
@@ -184,8 +184,8 @@
           :row-style="rowStyle"
           :cell-style="cellStyle"
           class="elTable table-fixed"
-          @sort-change="tableSort"
           :max-height="myHeight"
+          @sort-change="tableSort"
         >
           <el-table-column label="序号" align="center" type="index" width="50px">
             <template slot-scope="scope">
@@ -298,7 +298,7 @@
       </el-tab-pane>
     </el-tabs>
     <!-- 弹出层新增or修改 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" v-if ="dialogFormVisible" :close-on-click-modal="false" width="90%">
+    <el-dialog v-if="dialogFormVisible" :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
       <div class="app-add">
         <el-form
           ref="createTemp"
@@ -393,11 +393,11 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <!-- <el-col v-if="No2 && createTemp.useType == 6" :span="8">
+            <el-col v-if="No2 && createTemp.useType == 6" :span="8">
               <el-form-item label="订单号:" prop="greenFodderNumber">
                 <el-input ref="greenFodderNumber" v-model="createTemp.greenFodderNumber" maxlength="20" />
               </el-form-item>
-            </el-col> -->
+            </el-col>
             <el-col v-if="isReceiveTime2" :span="8">
               <el-form-item label="出库日期:" prop="receiveTime">
                 <el-date-picker
@@ -794,11 +794,11 @@
                 </el-radio-group>
               </el-form-item>
             </el-col>
-           <!-- <el-col :span="8" v-if="seeTemp.useType == 6">
-              <el-form-item v-if="oddCodeAllo" label="青贮单号:" prop="greenFodderNumber">
+            <el-col v-if="seeTemp.useType == 6" :span="8">
+              <el-form-item label="青贮单号:" prop="greenFodderNumber">
                 <el-input ref="oddCode" v-model="seeTemp.greenFodderNumber" disabled />
               </el-form-item>
-            </el-col> -->
+            </el-col>
             <el-col :span="8">
               <el-form-item v-if="oddCodeAllo" label="领用单号:" prop="oddCode">
                 <el-input ref="oddCode" v-model="seeTemp.oddCode" disabled />
@@ -955,20 +955,18 @@
             </template>
           </el-table-column>
 
-
           <el-table-column :key="19" label="备注" prop="sumPrice" align="center" min-width="80">
             <template slot-scope="scope">
               <span>{{ scope.row.note }}</span>
             </template>
           </el-table-column>
 
-          <el-table-column    prop="dflag" label="冲销状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.dflag == 1">已冲销</span>
-                <span v-else>未冲销</span>
-              </template>
-            </el-table-column>
-
+          <el-table-column prop="dflag" label="冲销状态" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.dflag == 1">已冲销</span>
+              <span v-else>未冲销</span>
+            </template>
+          </el-table-column>
 
         </el-table>
         <!-- <pagination
@@ -1026,8 +1024,8 @@
     </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>
+      <b style="line-height: 28px;">常见问题1:出库保存报错</b>
+      <br>
       <div class="app-description dialogMinHeight">
         <div class="content">
           报错原因1: 请求超时
@@ -1047,7 +1045,7 @@
 
 <script>
 // 引入
-import { GetDataByName, GetDataByNames, ExecDataByConfig, checkButtons, GetAccount, transData, PostDataByName, EasSync,SapUse  } from '@/api/common'
+import { GetDataByName, GetDataByNames, ExecDataByConfig, checkButtons, GetAccount, transData, PostDataByName, EasSync, SapUse } from '@/api/common'
 import waves from '@/directive/waves' // waves directive
 import { parseTime, sortChange } from '@/utils/index.js'
 // eslint-disable-next-line no-unused-vars
@@ -1069,16 +1067,15 @@ export default {
   },
   data() {
     return {
-      myHeight:document.documentElement.clientHeight - 85- 250,
-      isSap:1,
-      isSrm:1,
+      myHeight: document.documentElement.clientHeight - 85 - 250,
+      isSap: 1,
+      isSrm: 1,
       selectList: [],
-      currentRow:{},
+      currentRow: {},
       totalImportInfo: 0,
       listLoadingImportInfo: true,
       listImportInfo: [],
 
-
       isOutsap: [],
       // isReceiveImport: [],
       // isRetreatMuban: [],
@@ -1137,7 +1134,7 @@ export default {
       dialogPvVisible: false,
       // 校验规则
       // -----------------------------------------
-      isOutStockAdd: [], isReceiveTemplate: [], isOutStockImport: [], isOutStockExport: [], isOutStockSee: [], isOutStockDelete: [], isOutStockMethod1: [], isOutStockMethod2: [], isOutStockMethod3: [],isOutStockMethod4:[],isOutStockMethod5:[],
+      isOutStockAdd: [], isReceiveTemplate: [], isOutStockImport: [], isOutStockExport: [], isOutStockSee: [], isOutStockDelete: [], isOutStockMethod1: [], isOutStockMethod2: [], isOutStockMethod3: [], isOutStockMethod4: [], isOutStockMethod5: [],
       isEasSynchronization: [], isManualSynchronization: [], isCloseSynchronization: [], isIgnoreSynchronization: [],
       rules: {},
       rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
@@ -1204,7 +1201,7 @@ export default {
           useForm: '',
           useType: '',
           easStatus: '',
-          sapStatus:''
+          sapStatus: ''
         }
       },
       list: [],
@@ -1261,8 +1258,8 @@ export default {
         receiveTime: parseTime(new Date(), '{y}-{m}-{d}'),
         applicatId: Cookies.get('employeid'),
         departmentId: Cookies.get('departmentid'),
-        greenFodderNumber:'',
-        note:''
+        greenFodderNumber: '',
+        note: ''
       },
       requestSparePart: {
         name: 'getPartsListCK',
@@ -1338,7 +1335,7 @@ export default {
       // EAS同步
       easStatus: {
         easStatusList: [{ name: '同步成功', id: '1' }, { name: '同步失败', id: '0' }, { name: '关闭同步', id: '2' }],
-        sapStatusList: [ { name: '所有', id: '0' }, { name: '已上传', id: '1' }, { name: '未上传', id: '2' }],
+        sapStatusList: [{ name: '所有', id: '0' }, { name: '已上传', id: '1' }, { name: '未上传', id: '2' }],
         dialogStatus: '',
         dialogFormVisible: false,
         tableKey: 0,
@@ -1359,7 +1356,7 @@ export default {
       description: {
         dialogFormVisible: false,
         dialogStatus: ''
-      },
+      }
     }
   },
   computed: {
@@ -1396,21 +1393,17 @@ export default {
 
     listAdd: {
       deep: true,
-      handler: function (item) {
-
-          this.listAdd.forEach(function(i){
-            if(parseInt(i.checkoutNumber) > parseInt(i.amount)){
-              i.checkoutNumber = i.amount
-            }
-            if(parseInt(i.checkoutNumber) > parseInt(i.reportery)){
-              i.checkoutNumber = i.reportery
-            }
-
-          })
-
-
+      handler: function(item) {
+        this.listAdd.forEach(function(i) {
+          if (parseInt(i.checkoutNumber) > parseInt(i.amount)) {
+            i.checkoutNumber = i.amount
+          }
+          if (parseInt(i.checkoutNumber) > parseInt(i.reportery)) {
+            i.checkoutNumber = i.reportery
+          }
+        })
       }
-    },
+    }
 
   },
   created() {
@@ -1437,71 +1430,59 @@ export default {
     },
 
     handleCurrentChange(val) {
-        this.currentRow = val;
-        console.log("currentRow",this.currentRow)
+      this.currentRow = val
+      console.log('currentRow', this.currentRow)
     },
 
-    checkboxInit(row,index){
+    checkboxInit(row, index) {
       // console.log(row)
-      if(row.ProofCode){
+      if (row.ProofCode) {
         return 0
       } else {
-
         var data1 = new Date(row.creatTime)
         var data2 = new Date('2022-10-25')
-        if(data1 > data2){ return 1 } else {return 0}
-
+        if (data1 > data2) { return 1 } else { return 0 }
       }
     },
 
-    //监听 - 表格 - 勾选
+    // 监听 - 表格 - 勾选
     change_table_selection(val) {
       this.selectList = val
       console.log('勾选数据selectList', this.selectList)
     },
 
-    sapUpload(){
+    sapUpload() {
       const that = this
-      console.log("currentRow ProofCode",this.currentRow.ProofCode)
+      console.log('currentRow ProofCode', this.currentRow.ProofCode)
       var send_data = this.selectList
 
-      if(send_data.length == 0){
-        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+      if (send_data.length == 0) {
+        that.$notify({ title: '失败', message: '请勾选数据!', type: 'error', duration: 2000 })
         return false
       }
 
-
       console.log(that.isSap)
 
-      if(that.isSap == 1){
-
-         that.isSap = 0
-         SapUse(send_data).then(response => {
-              console.log('response', response)
-
-              if (response.msg !== 'fail') {
-                that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-                that.selectList = []
-                that.get_table_data()
-
-                } else {
-                  that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
-                }
-            })
-
+      if (that.isSap == 1) {
+        that.isSap = 0
+        SapUse(send_data).then(response => {
+          console.log('response', response)
 
+          if (response.msg !== 'fail') {
+            that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
+            that.selectList = []
+            that.get_table_data()
+          } else {
+            that.$notify({ title: '失败', message: '上传失败', type: 'error', duration: 2000 })
+          }
+        })
       } else {
-
-        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击', type: 'error', duration: 2000 })
       }
 
       setTimeout(() => {
-              that.isSap = 1
-            }, 3000)
-
-
-
-
+        that.isSap = 1
+      }, 3000)
 
       // if(this.currentRow.ProofCode){
       //    console.log("currentRow ProofCode 这个值说明已经上传了,不用上传")
@@ -1531,12 +1512,9 @@ export default {
       //       })
 
       // }
-
     },
 
-
     get_auto_buttons() {
-
       const Outsap = 'customs:outStock:sap'
       const isOutsap = checkButtons(this.$store.state.user.buttons, OutStockAdd)
       this.isOutsap = isOutsap
@@ -1911,7 +1889,7 @@ export default {
         // 调拨数量/出库数量显示
         this.allo = true
         this.No4 = false
-      }else if(val === 5){
+      } else if (val === 5) {
         // 报废出库
         this.No1 = false
         this.No2 = true
@@ -1924,7 +1902,7 @@ export default {
         this.No4 = true
         // 调拨数量/出库数量
         this.allo = false
-      }else if(val === 6){
+      } else if (val === 6) {
         // 报废出库
         this.No1 = false
         this.No2 = true
@@ -1953,9 +1931,8 @@ export default {
       this.getParmCreateAdd.parammaps.id = item.id
       this.getParmCreateAdd.parammaps.pastureId = Cookies.get('pastureid')
 
-
       // this.createTemp.departmentId = item.departmentId
-      this.$set(this.createTemp, "departmentId", item.departmentId)
+      this.$set(this.createTemp, 'departmentId', item.departmentId)
 
       this.createTemp.bid = item.id
       this.createTemp.applicatId = item.empId
@@ -2301,13 +2278,13 @@ export default {
             note: this.createTemp.note
           }}
 
-          if(this.createTemp.oddCode == ""){
+          if (this.createTemp.oddCode == '') {
             this.$notify({
-                title: '保存失败',
-                message: '领用单号不得为空',
-                type: 'warning',
-                duration: 2000
-              })
+              title: '保存失败',
+              message: '领用单号不得为空',
+              type: 'warning',
+              duration: 2000
+            })
             return false
           }
           this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
@@ -2499,13 +2476,13 @@ export default {
             note: this.createTemp.note
           }}
 
-          if(this.createTemp.oddCode == ""){
+          if (this.createTemp.oddCode == '') {
             this.$notify({
-                title: '保存失败',
-                message: '领用单号不得为空',
-                type: 'warning',
-                duration: 2000
-              })
+              title: '保存失败',
+              message: '领用单号不得为空',
+              type: 'warning',
+              duration: 2000
+            })
             return false
           }
           this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
@@ -2561,8 +2538,8 @@ export default {
             }
           })
           return true
-        }else if(this.createTemp.useType === 5){
-          console.log('baofei',this.createTemp.oddCode)
+        } else if (this.createTemp.useType === 5) {
+          console.log('baofei', this.createTemp.oddCode)
           // 报废出库
           this.postDataPramas.common = { 'returnmap': '0' }
           this.postDataPramas.data = []
@@ -2610,13 +2587,13 @@ export default {
             note: this.createTemp.note
           }}
 
-          if(this.createTemp.oddCode == ""){
+          if (this.createTemp.oddCode == '') {
             this.$notify({
-                title: '保存失败',
-                message: '领用单号不得为空',
-                type: 'warning',
-                duration: 2000
-              })
+              title: '保存失败',
+              message: '领用单号不得为空',
+              type: 'warning',
+              duration: 2000
+            })
             return false
           }
 
@@ -2672,7 +2649,7 @@ export default {
             }
           })
           return true
-        }else if(this.createTemp.useType === 6){
+        } else if (this.createTemp.useType === 6) {
           // 青贮出库
           this.postDataPramas.common = { 'returnmap': '0' }
           this.postDataPramas.data = []
@@ -2718,7 +2695,7 @@ export default {
             receiveTime: this.createTemp.receiveTime,
             empId: this.createTemp.empId,
             note: this.createTemp.note,
-            greenFodderNumber:this.createTemp.greenFodderNumber
+            greenFodderNumber: this.createTemp.greenFodderNumber
           }}
 
           // if(this.createTemp.oddCode == ""){
@@ -2890,21 +2867,16 @@ export default {
       GetAccount(this.requestParam).then(response => {
         this.$nextTick(() => {
           import('@/vendor/Export2Excel').then(excel => {
-
-
             if (response.data.list !== null) {
               for (let i = 0; i < response.data.list.length; i++) {
-
-                if(response.data.list[i].sterilisation == 1){
-                  this.$set(response.data.list[i], 'sterilisation', "已冲销")
+                if (response.data.list[i].sterilisation == 1) {
+                  this.$set(response.data.list[i], 'sterilisation', '已冲销')
                 } else {
-                  this.$set(response.data.list[i], 'sterilisation', "未冲销")
+                  this.$set(response.data.list[i], 'sterilisation', '未冲销')
                 }
               }
             }
 
-
-
             const list1 = response.data.list
             if (response.data.list !== '') {
               this.percentage = 99
@@ -2913,13 +2885,10 @@ export default {
               }, 2000)
             }
 
-
-
-
             const tHeader = [
-              '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号','资产品牌', '费用类型', '领用部门', '领用人', '备注', '冲销状态']
+              '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号', '资产品牌', '费用类型', '领用部门', '领用人', '备注', '冲销状态']
             const filterVal = [
-              'pastureName', 'useForm', 'creatTime', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'checkoutNumber', 'price', 'sumPrice', 'warehoseCode', 'providerName', 'eqName', 'eqCode', 'eqBrand','useTypeV', 'departmentName', 'appliname', 'note', 'sterilisation'
+              'pastureName', 'useForm', 'creatTime', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'checkoutNumber', 'price', 'sumPrice', 'warehoseCode', 'providerName', 'eqName', 'eqCode', 'eqBrand', 'useTypeV', 'departmentName', 'appliname', 'note', 'sterilisation'
             ]
             const data1 = this.formatJson(filterVal, list1)
             excel.export_json_to_excel({ header: tHeader, data: data1, filename: this.requestParam.parammaps.formType, autoWidth: true, bookType: 'xlsx' })

File diff suppressed because it is too large
+ 1155 - 469
src/views/custom/subscribe/index.vue


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