linwenxin před 7 měsíci
rodič
revize
b1c68c7ee4

+ 95 - 56
src/views/auxiliaryFittings/purchasingManagement/components/retStorage.vue

@@ -1,26 +1,53 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
-    :table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
-    :column-parsing="columnParsing" :operation="operation()" :replaceOrNotMap="false">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :exportList="exportList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :operation="operation()"
+    :replaceOrNotMap="false"
+  >
     <div class="cartographer">
-      <el-dialog :title="({ M: '辅材退货单', P: '配件退货单' })[storageType]" width="100%" :modal="false" :visible.sync="formDialog"
-        :before-close="formCancel">
+      <el-dialog
+        :title="{ M: '辅材退货单', P: '配件退货单' }[storageType]"
+        width="100%"
+        :modal="false"
+        :visible.sync="formDialog"
+        :before-close="formCancel"
+      >
         <zj-form-container v-if="formDialog" ref="formRef" :form-data="formData" :styleSwitch="false">
-          <zj-form-module title="单据信息" label-width="120px" :showPackUp="false" :form-data="formData"
-            :form-items="formItems1">
+          <zj-form-module
+            title="单据信息"
+            label-width="120px"
+            :showPackUp="false"
+            :form-data="formData"
+            :form-items="formItems1"
+          >
           </zj-form-module>
-          <zj-form-module :title="({ M: '辅材信息', P: '配件信息' })[storageType]" label-width="120px" :showPackUp="false"
-            :form-data="formData" :form-items="formItems2">
+          <zj-form-module
+            :title="{ M: '辅材信息', P: '配件信息' }[storageType]"
+            label-width="120px"
+            :showPackUp="false"
+            :form-data="formData"
+            :form-items="formItems2"
+          >
           </zj-form-module>
         </zj-form-container>
         <div slot="footer" class="dialog-footer">
           <el-button size="mini" @click="formCancel">取 消</el-button>
-          <el-button v-if="~[0, 1].indexOf(formDialogType)" size="mini" @click="formConfirm" type="primary">确
-            定</el-button>
-          <el-button v-if="~[3].indexOf(formDialogType)" size="mini" @click="passExamination('OK')"
-            type="primary">审核通过</el-button>
-          <el-button v-if="~[3].indexOf(formDialogType)" size="mini" @click="passExamination('FAIL')"
-            type="primary">驳回</el-button>
+          <el-button v-if="~[0, 1].indexOf(formDialogType)" size="mini" @click="formConfirm" type="primary"
+            >确 定</el-button
+          >
+          <el-button v-if="~[3].indexOf(formDialogType)" size="mini" @click="passExamination('OK')" type="primary"
+            >审核通过</el-button
+          >
+          <el-button v-if="~[3].indexOf(formDialogType)" size="mini" @click="passExamination('FAIL')" type="primary"
+            >驳回</el-button
+          >
         </div>
       </el-dialog>
     </div>
@@ -30,14 +57,21 @@
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import form_tpl from "../mixins/form_tpl.js"
+import form_tpl from '../mixins/form_tpl.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
-import { websitPurchaseRetList, websitPurchaseRetListExport, websitPurchaseRetAdd, websitPurchaseRetEdit, websitPurchaseRetConfirm, websitPurchaseRetDetail } from "@/api/purchasingManagement.js"
+import {
+  websitPurchaseRetList,
+  websitPurchaseRetListExport,
+  websitPurchaseRetAdd,
+  websitPurchaseRetEdit,
+  websitPurchaseRetConfirm,
+  websitPurchaseRetDetail
+} from '@/api/purchasingManagement.js'
 export default {
   props: {
     storageType: {
       type: String,
-      default: ""
+      default: ''
     }
   },
   components: { TemplatePage },
@@ -46,38 +80,38 @@ export default {
     return {
       formData: {
         companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
-        "companyWechatId": "",
-        "confirmBy": "",
-        "confirmTime": "",
-        "createBy": "",
-        "createTime": "",
-        "flag": "",
-        "goodsType": this.storageType,
-        "purchaseId": "",
-        "purchaseRetId": "",
-        "remark": "",
-        "retTime": "",
-        "retTotalAmount": 0,
-        "retTotalQty": 0,
-        "updateBy": "",
-        "updateTime": "",
-        "venderId": "",
-        "venderName": "",
-        storageId:"",
-        "websitId": "",
-        "websitName": "",
+        companyWechatId: '',
+        confirmBy: '',
+        confirmTime: '',
+        createBy: '',
+        createTime: '',
+        flag: '',
+        goodsType: this.storageType,
+        purchaseId: '',
+        purchaseRetId: '',
+        remark: '',
+        retTime: '',
+        retTotalAmount: 0,
+        retTotalQty: 0,
+        updateBy: '',
+        updateTime: '',
+        venderId: '',
+        venderName: '',
+        storageId: '',
+        websitId: '',
+        websitName: '',
         items: [],
         imageUrl: []
-      },
+      }
     }
   },
   methods: {
     // 列表请求函数
     getList(p, cb) {
       var pam = JSON.parse(JSON.stringify(p))
-      pam.params.push({ "param": "a.goods_type", "compare": "=", "value": this.storageType })
+      pam.params.push({ param: 'a.goods_type', compare: '=', value: this.storageType })
       if (pam.flag) {
-        pam.params.push({ "param": "a.flag", "compare": "=", "value": pam.flag })
+        pam.params.push({ param: 'a.flag', compare: '=', value: pam.flag })
       }
       cb && cb(pam)
       return websitPurchaseRetList(pam)
@@ -89,7 +123,7 @@ export default {
       return this.operationBtn({
         edit: {
           conditions: ({ row, index, column }) => {
-            return row.flag == "SAVE"
+            return row.flag == 'SAVE'
           },
           click: ({ row, index, column }) => {
             this.getDetail(row.purchaseRetId, 1)
@@ -102,12 +136,12 @@ export default {
         },
         examine: {
           conditions: ({ row, index, column }) => {
-            return row.flag == "SAVE"
+            return row.flag == 'SAVE'
           },
           click: ({ row, index, column }) => {
             this.getDetail(row.purchaseRetId, 3)
           }
-        },
+        }
       })
     },
 
@@ -127,23 +161,29 @@ export default {
     formConfirm() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          ([websitPurchaseRetAdd, websitPurchaseRetEdit][this.formDialogType])({
-            ...this.formData,
-            "goodsType": this.storageType,
-            imageUrl: this.formData.imageUrl.map(item => item.url).join(","),
-          }).then(res => {
-            this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
-            this.formCancel()
-            this.$refs.pageRef.refreshList()
-          })
+          ;[websitPurchaseRetAdd, websitPurchaseRetEdit]
+            [this.formDialogType]({
+              ...this.formData,
+              goodsType: this.storageType,
+              imageUrl: this.formData.imageUrl.map(item => item.url).join(',')
+            })
+            .then(res => {
+              this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
+              this.formCancel()
+              this.$refs.pageRef.refreshList()
+            })
         }
       })
     },
     passExamination(flag) {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          websitPurchaseRetConfirm({ purchaseRetId: this.formData.purchaseRetId, flag: flag, storageId: this?.formData?.storageId }).then(res => {
-            this.$message({ type: 'success', message: flag=='OK'?`审核通过!`:'驳回通过' })
+          websitPurchaseRetConfirm({
+            purchaseRetId: this.formData.purchaseRetId,
+            flag: flag,
+            storageId: this?.formData?.storageId
+          }).then(res => {
+            this.$message({ type: 'success', message: flag == 'OK' ? `审核通过!` : '驳回通过' })
             this.formCancel()
             this.$refs.pageRef.refreshList()
           })
@@ -162,4 +202,3 @@ export default {
   }
 }
 </style>
-

+ 1 - 1
src/views/auxiliaryFittings/purchasingManagement/returnAuxiliaryMaterials/index.vue

@@ -3,7 +3,7 @@
 </template>
 
 <script>
-import RetStorage from "../components/retStorage.vue"
+import RetStorage from '../components/retStorage.vue'
 export default { components: { RetStorage } }
 </script>
 

+ 154 - 141
src/views/auxiliaryFittings/salesManagement/auxiliaryAdjustPriceOrder/index.vue

@@ -1,22 +1,35 @@
 <template>
-	<div class="page">
-		<template-page v-if="!formDialog && isShowTab" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
-			:table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
-			:column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
-			<div slot="moreSearch">
-				<el-radio-group v-model="flag" size="mini" @change="changeType">
-					<el-radio-button label="">全部</el-radio-button>
-					<el-radio-button label="SAVE">已保存</el-radio-button>
-					<el-radio-button label="OK">已审核</el-radio-button>
-				</el-radio-group>
-				<br><br>
-			</div>
-		</template-page>
-		<div class="detail" v-if="formDialog">
-			<auxiliaryAdjustPriceOrderDetail :id="id" @back="backList" :formType="formDialogType"
-				:title="'辅材调价单' + formDialogTitles[formDialogType]"></auxiliaryAdjustPriceOrderDetail>
-		</div>
-	</div>
+  <div class="page">
+    <template-page
+      v-if="!formDialog && isShowTab"
+      ref="pageRef"
+      :get-list="getList"
+      :table-attributes="tableAttributes"
+      :table-events="tableEvents"
+      :options-evens-group="optionsEvensGroup"
+      :moreParameters="moreParameters"
+      :column-parsing="columnParsing"
+      :operation="operation()"
+      :exportList="exportList"
+    >
+      <div slot="moreSearch">
+        <el-radio-group v-model="flag" size="mini" @change="changeType">
+          <el-radio-button label="">全部</el-radio-button>
+          <el-radio-button label="SAVE">已保存</el-radio-button>
+          <el-radio-button label="OK">已审核</el-radio-button>
+        </el-radio-group>
+        <br /><br />
+      </div>
+    </template-page>
+    <div class="detail" v-if="formDialog">
+      <auxiliaryAdjustPriceOrderDetail
+        :id="id"
+        @back="backList"
+        :formType="formDialogType"
+        :title="'辅材调价单' + formDialogTitles[formDialogType]"
+      ></auxiliaryAdjustPriceOrderDetail>
+    </div>
+  </div>
 </template>
 
 <script>
@@ -26,140 +39,140 @@ import import_mixin from '@/components/template/import_mixin.js'
 import ImageUpload from '@/components/file-upload'
 import { downloadFiles } from '@/utils/util'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
-import { listPageV2, pageExport } from "@/api/auxiliaryFittings/auxiliaryAdjustPriceOrder";
+import { listPageV2, pageExport } from '@/api/auxiliaryFittings/auxiliaryAdjustPriceOrder'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
-	components: { TemplatePage, ImageUpload, auxiliaryAdjustPriceOrderDetail },
-	mixins: [import_mixin, operation_mixin],
-	data() {
-		return {
-			// 表格属性
-			tableAttributes: {
-				// 启用勾选列
-				selectColumn: true
-			},
-			// 表格事件
-			tableEvents: {
-				'selection-change': this.selectionChange
-			},
-			// 勾选选中行
-			recordSelected: [],
-			/** 表单变量 */
-			formDialogType: 0,
-			formDialogTitles: ["新增", "编辑", "详情"],
-			formDialog: false,
-			id: '',
-			flag: this?.$route?.params?.pageCode || '',
-			isShowTab: true
-		}
-	},
-	computed: {
-		// 事件组合
-		optionsEvensGroup() {
-			return [
-				[
-					[
-						this.optionsEvensAuth("add", {
-							click: this.addData
-						}),
-					]
-				]
-			]
-		},
-		// 更多参数
-		moreParameters() {
-			return []
-		},
-		formItems() { }
-	},
-	watch: {
-		flag(){
-			this.isShowTab = false
-			this.$nextTick(()=>{
-				this.isShowTab = true
-			})
-		}
-	},
-	methods: {
-		// 切换状态
-		changeType(val) {
-			this.$refs.pageRef.refreshList()
-		},
-		backList() {
-			this.id = ''
-			this.formDialog = false;
-			this.$refs.pageRef.refreshList()
-		},
-		// 列表请求函数
-		getList(p, cb) {
-			try {
-				var pam = JSON.parse(JSON.stringify(p))
-				if (this.flag) {
-					pam.params.push({ "param": "a.flag", "compare": "=", "value": this.flag })
-				}
-				cb && cb(pam)
-				return listPageV2(pam)
-			} catch (error) {
-				console.log(error)
-			}
-		},
-		// 列表导出函数
-		exportList: pageExport,
-		// 表格列解析渲染数据更改
-		columnParsing(item, defaultData) {
-			return defaultData
-		},
-		// 监听勾选变化
-		selectionChange(data) {
-			this.recordSelected = data
-		},
+  components: { TemplatePage, ImageUpload, auxiliaryAdjustPriceOrderDetail },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialogType: 0,
+      formDialogTitles: ['新增', '编辑', '详情'],
+      formDialog: false,
+      id: '',
+      flag: this?.$route?.params?.pageCode || '',
+      isShowTab: true
+    }
+  },
+  computed: {
+    // 事件组合
+    optionsEvensGroup() {
+      return [
+        [
+          [
+            this.optionsEvensAuth('add', {
+              click: this.addData
+            })
+          ]
+        ]
+      ]
+    },
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {}
+  },
+  watch: {
+    flag() {
+      this.isShowTab = false
+      this.$nextTick(() => {
+        this.isShowTab = true
+      })
+    }
+  },
+  methods: {
+    // 切换状态
+    changeType(val) {
+      this.$refs.pageRef.refreshList()
+    },
+    backList() {
+      this.id = ''
+      this.formDialog = false
+      this.$refs.pageRef.refreshList()
+    },
+    // 列表请求函数
+    getList(p, cb) {
+      try {
+        var pam = JSON.parse(JSON.stringify(p))
+        if (this.flag) {
+          pam.params.push({ param: 'a.flag', compare: '=', value: this.flag })
+        }
+        cb && cb(pam)
+        return listPageV2(pam)
+      } catch (error) {
+        console.log(error)
+      }
+    },
+    // 列表导出函数
+    exportList: pageExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
 
-		operation() {
-			return this.operationBtn({
-				edit: {
-					conditions: ({ row, index, column }) => {
-						return row.flag == 'SAVE'
-					},
-					click: ({ row, index, column }) => {
-						this.id = row.sheetId
-						this.formDialogType = 1
-						this.openForm()
-					}
-				},
-				detail: {
-					conditions: ({ row, index, column }) => {
-						return row.flag == 'OK'
-					},
-					click: ({ row, index, column }) => {
-						this.id = row.sheetId
-						this.formDialogType = 2
-						this.openForm()
-					}
-				},
-			})
-		},
+    operation() {
+      return this.operationBtn({
+        edit: {
+          conditions: ({ row, index, column }) => {
+            return row.flag == 'SAVE'
+          },
+          click: ({ row, index, column }) => {
+            this.id = row.sheetId
+            this.formDialogType = 1
+            this.openForm()
+          }
+        },
+        detail: {
+          conditions: ({ row, index, column }) => {
+            return row.flag == 'OK'
+          },
+          click: ({ row, index, column }) => {
+            this.id = row.sheetId
+            this.formDialogType = 2
+            this.openForm()
+          }
+        }
+      })
+    },
 
-		addData() {
-			this.formDialogType = 0
-			this.openForm()
-		},
-		openForm() {
-			this.formDialog = true;
-		},
-		// 下载导入模版
-		handleDownload() {
-			// downloadFiles('charging/standard/download');
-		},
-	}
+    addData() {
+      this.formDialogType = 0
+      this.openForm()
+    },
+    openForm() {
+      this.formDialog = true
+    },
+    // 下载导入模版
+    handleDownload() {
+      // downloadFiles('charging/standard/download');
+    }
+  }
 }
 </script>
 
 <style lang="scss" scoped>
 .page {
-	height: 100%;
+  height: 100%;
 }
 
 .tab {
-	padding: 20px 20px 0 20px;
+  padding: 20px 20px 0 20px;
 }
 </style>

+ 5 - 5
src/views/partsManagement/accessoriesHome/index.vue

@@ -57,7 +57,7 @@
             <div class="tab">
               <div class="text">
                 <div class="num">{{ collectData.saveSalesPNum }}</div>
-                <div class="title">存数量</div>
+                <div class="title">存数量</div>
               </div>
             </div>
             <div class="tab">
@@ -101,7 +101,7 @@
             <div class="tab">
               <div class="text">
                 <div class="num">{{ collectData.bcNewNum }}</div>
-                <div class="title">存数量</div>
+                <div class="title">存数量</div>
               </div>
             </div>
             <div class="tab">
@@ -157,7 +157,7 @@
             <div class="tab">
               <div class="text">
                 <div class="num">{{ collectData.bcOldNum }}</div>
-                <div class="title">存数量</div>
+                <div class="title">存数量</div>
               </div>
             </div>
             <div class="tab">
@@ -213,7 +213,7 @@
             <div class="tab">
               <div class="text">
                 <div class="num">{{ collectData.bcNewSaleNum }}</div>
-                <div class="title">存数量</div>
+                <div class="title">存数量</div>
               </div>
             </div>
             <div class="tab">
@@ -269,7 +269,7 @@
             <div class="tab">
               <div class="text">
                 <div class="num">{{ collectData.bcNewInnerNum }}</div>
-                <div class="title">存数量</div>
+                <div class="title">存数量</div>
               </div>
             </div>
             <div class="tab">