Browse Source

no message

linwenxin 8 months ago
parent
commit
fd532ea999

+ 9 - 2
src/api/inventoryManagement.js

@@ -66,6 +66,14 @@ export function websitStockAccListP(data) {
   })
 }
 
+export function workerStockDel(data) {
+  return request({
+    url: '/worker/stock/del',
+    method: 'post',
+    data
+  })
+}
+
 export function websitStockAccListPExport(data, name) {
   return postBlob({
     url: '/websit/stock/acc/listP/export',
@@ -112,7 +120,6 @@ export function workerStockAccListExport(data, name) {
   })
 }
 
-
 // --------------------------------------------------------
 
 export function workerStockListP(data) {
@@ -149,4 +156,4 @@ export function workerStockAccListPExport(data, name) {
     data,
     name
   })
-}
+}

+ 0 - 6
src/views/auxiliaryFittings/auxiliaryDataManagement/masterAuxiliaryMaterials/index.vue

@@ -12,7 +12,6 @@
         :column-parsing="columnParsing"
         :operation="operation()"
         :exportList="exportList"
-        :operationColumnWidth="80"
       >
       </template-page>
       <div v-if="~['add', 'edit'].indexOf(activeKey)">
@@ -345,11 +344,6 @@ export default {
     },
     operation() {
       return this.operationBtn({
-        // view: {
-        //   click: ({ row, index, column }) => {
-        //     this.openForm('edit', row.goodsId)
-        //   }
-        // },
         edit: {
           click: ({ row, index, column }) => {
             this.openForm('edit', row.goodsId)

+ 20 - 1
src/views/auxiliaryFittings/inventoryManagement/masterAuxiliaryInven/index.vue

@@ -8,6 +8,7 @@
     :moreParameters="moreParameters"
     :column-parsing="columnParsing"
     :exportList="exportList"
+    :operation="operation()"
   >
   </template-page>
 </template>
@@ -15,7 +16,7 @@
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import { workerStockList, workerStockListExport, workerStockImportM } from '@/api/inventoryManagement'
+import { workerStockList, workerStockListExport, workerStockImportM, workerStockDel } from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
@@ -87,6 +88,24 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
+    },
+    operation() {
+      return this.operationBtn({
+        del: {
+          prompt: '此操作将永久删除数据, 是否继续?',
+          click: ({ row, index, column }) => {
+            workerStockDel({
+              ids: [row.id]
+            }).then(res => {
+              this.$message({
+                message: '删除成功',
+                type: 'success'
+              })
+              this.$refs?.pageRef?.refreshList()
+            })
+          }
+        }
+      })
     }
   }
 }

+ 156 - 143
src/views/auxiliaryFittings/projectAuxiliaryManage/index.vue

@@ -1,22 +1,32 @@
 <template>
-	<div class="page">
-		<template-page v-if="isShowTab && !formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
-			:table-events="tableEvents" :operationColumnWidth="170" :options-evens-group="optionsEvensGroup"
-			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
-			<div slot="moreSearch">
-				<el-radio-group v-model="status" size="mini" @change="changeType">
-					<el-radio-button label="">全部</el-radio-button>
-					<el-radio-button label="NO">未付款</el-radio-button>
-					<el-radio-button label="WAIT">部分付款</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">
-			<detail :id="id" @back="backList" :formType="formDialogType" title="工程辅材收款详情"></detail>
-		</div>
-	</div>
+  <div class="page">
+    <template-page
+      v-if="isShowTab && !formDialog"
+      ref="pageRef"
+      :get-list="getList"
+      :table-attributes="tableAttributes"
+      :table-events="tableEvents"
+      :operationColumnWidth="170"
+      :options-evens-group="optionsEvensGroup"
+      :moreParameters="moreParameters"
+      :column-parsing="columnParsing"
+      :operation="operation()"
+      :exportList="exportList"
+    >
+      <div slot="moreSearch">
+        <el-radio-group v-model="status" size="mini" @change="changeType">
+          <el-radio-button label="">全部</el-radio-button>
+          <el-radio-button label="NO">未付款</el-radio-button>
+          <el-radio-button label="WAIT">部分付款</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">
+      <detail :id="id" @back="backList" :formType="formDialogType" title="工程辅材收款详情"></detail>
+    </div>
+  </div>
 </template>
 
 <script>
@@ -26,142 +36,145 @@ 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 { listPage, pageExport } from "@/api/auxiliaryFittings/projectAuxiliaryManage";
+import { listPage, pageExport } from '@/api/auxiliaryFittings/projectAuxiliaryManage'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
-	components: { TemplatePage, ImageUpload, detail },
-	mixins: [import_mixin, operation_mixin],
-	data() {
-		return {
-			// 表格属性
-			tableAttributes: {
-				// 启用勾选列
-				selectColumn: true
-			},
-			// 表格事件
-			tableEvents: {
-				'selection-change': this.selectionChange
-			},
-			// 勾选选中行
-			recordSelected: [],
-			/** 表单变量 */
-			formDialogType: 0,
-			formDialogTitles: ["新增", "编辑", "详情"],
-			formDialog: false,
-			id: '',
-			status: this?.$route?.params?.pageCode || '',
-			isShowTab: true
-		}
-	},
-	computed: {
-		// 事件组合
-		optionsEvensGroup() {
-			return [
-				// [
-				// 	[
-				// 		this.optionsEvensAuth("add", {
-				// 			click: this.addData
-				// 		}),
-				// 	]
-				// ]
-			]
-		},
-		// 更多参数
-		moreParameters() {
-			return []
-		},
-		formItems() { }
-	},
-	created(){},
-	watch: {
-		status(){
-			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))
-				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'M' }, { 'param': 'a.status', "compare": "=", "value": this.status })
-				cb && cb(pam)
-				return listPage(pam)
-			} catch (error) {
-				console.log(error)
-			}
-		},
-		// 列表导出函数
-		exportList: pageExport,
-		// 表格列解析渲染数据更改
-		columnParsing(item, defaultData) {
-			return defaultData
-		},
-		// 监听勾选变化
-		selectionChange(data) {
-			this.recordSelected = data
-		},
+  components: { TemplatePage, ImageUpload, detail },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialogType: 0,
+      formDialogTitles: ['新增', '编辑', '详情'],
+      formDialog: false,
+      id: '',
+      status: this?.$route?.params?.pageCode || '',
+      isShowTab: true
+    }
+  },
+  computed: {
+    // 事件组合
+    optionsEvensGroup() {
+      return [
+        // [
+        // 	[
+        // 		this.optionsEvensAuth("add", {
+        // 			click: this.addData
+        // 		}),
+        // 	]
+        // ]
+      ]
+    },
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {}
+  },
+  created() {},
+  watch: {
+    status() {
+      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))
+        pam.params.push(
+          { param: 'a.goods_type', compare: '=', value: 'M' },
+          { param: 'a.status', compare: '=', value: this.status }
+        )
+        cb && cb(pam)
+        return listPage(pam)
+      } catch (error) {
+        console.log(error)
+      }
+    },
+    // 列表导出函数
+    exportList: pageExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
 
-		operation() {
-			return this.operationBtn({
-				detail: {
-					click: ({ row, index, column }) => {
-						this.id = row.websitSalesManagerId
-						this.formDialogType = 2
-						this.openForm()
-					}
-				},
-				sellOrderDetail: {
-					click: ({ row, index, column }) => {
-						this.$router.push({
-							name: 'auxiliarySalesOrder',
-							params: {
-								pageName: row.orderEnginBaseId,
-								pageType: '-',
-								pageCode: row.orderEnginBaseId,
-							},
-						})
-					}
-				},
-				returnGoodsDetail: {
-					click: ({ row, index, column }) => {
-						this.$router.push({
-							name: 'auxiliarySalesReturnOrder',
-							params: {
-								pageName: row.orderEnginBaseId,
-								pageType: '-',
-								pageCode: row.orderEnginBaseId,
-							},
-						})
-					}
-				},
-			})
-		},
+    operation() {
+      return this.operationBtn({
+        detail: {
+          click: ({ row, index, column }) => {
+            this.id = row.websitSalesManagerId
+            this.formDialogType = 2
+            this.openForm()
+          }
+        },
+        sellOrderDetail: {
+          click: ({ row, index, column }) => {
+            this.$router.push({
+              name: 'auxiliarySalesOrder',
+              params: {
+                pageName: row.orderEnginBaseId,
+                pageType: '-',
+                pageCode: row.orderEnginBaseId
+              }
+            })
+          }
+        },
+        returnGoodsDetail: {
+          click: ({ row, index, column }) => {
+            this.$router.push({
+              name: 'auxiliarySalesReturnOrder',
+              params: {
+                pageName: row.orderEnginBaseId,
+                pageType: '-',
+                pageCode: row.orderEnginBaseId
+              }
+            })
+          }
+        }
+      })
+    },
 
-		openForm() {
-			this.formDialog = true;
-		}
-	}
+    openForm() {
+      this.formDialog = true
+    }
+  }
 }
 </script>
 
 <style lang="scss" scoped>
 .page {
-	height: 100%;
+  height: 100%;
 }
 
 .tab {
-	padding: 20px 20px 0 20px;
+  padding: 20px 20px 0 20px;
 }
 </style>