فهرست منبع

业务锁no修改

lichao 3 سال پیش
والد
کامیت
41ad84013f

+ 1 - 1
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -1992,7 +1992,7 @@ export default {
         moduleName: 'fh',
         moduleName: 'fh',
         tableName: 'business_delivery',
         tableName: 'business_delivery',
         billId: this.form.id,
         billId: this.form.id,
-        no: 87654567
+        no: localStorage.getItem('browserID')
       }
       }
       this.saveLoading = true
       this.saveLoading = true
       this.checkLock(data).then(res => {
       this.checkLock(data).then(res => {

+ 1 - 1
src/views/businessManagement/deliveryNotice/index.vue

@@ -253,7 +253,7 @@ export default {
         moduleName: 'fh',
         moduleName: 'fh',
         tableName: 'business_delivery',
         tableName: 'business_delivery',
         billId: row.id,
         billId: row.id,
-        no: 87654567
+        no: localStorage.getItem('browserID')
       }
       }
       this.checkLock(data).then(res => {
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
         if (res.data.code == 200) {

+ 1 - 1
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -1832,7 +1832,7 @@ export default {
         moduleName: 'cg',
         moduleName: 'cg',
         tableName: 'business_order',
         tableName: 'business_order',
         billId: this.form.id,
         billId: this.form.id,
-        no: 87654567
+        no: localStorage.getItem('browserID')
       }
       }
       this.saveLoading = true
       this.saveLoading = true
       this.checkLock(data).then(res => {
       this.checkLock(data).then(res => {

+ 1 - 1
src/views/businessManagement/purchaseOrder/index.vue

@@ -312,7 +312,7 @@ export default {
         moduleName: 'cg',
         moduleName: 'cg',
         tableName: 'business_order',
         tableName: 'business_order',
         billId: row.id,
         billId: row.id,
-        no: 87654567
+        no: localStorage.getItem('browserID')
       }
       }
       this.checkLock(data).then(res => {
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
         if (res.data.code == 200) {

+ 1 - 1
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -1462,7 +1462,7 @@ export default {
         moduleName: 'sh',
         moduleName: 'sh',
         tableName: 'business_delivery',
         tableName: 'business_delivery',
         billId: this.form.id,
         billId: this.form.id,
-        no: 87654567
+        no: localStorage.getItem('browserID')
       }
       }
       this.saveLoading = true
       this.saveLoading = true
       this.checkLock(data).then(res => {
       this.checkLock(data).then(res => {

+ 1 - 1
src/views/businessManagement/receipt/index.vue

@@ -256,7 +256,7 @@ export default {
         moduleName: 'sh',
         moduleName: 'sh',
         tableName: 'business_delivery',
         tableName: 'business_delivery',
         billId: row.id,
         billId: row.id,
-        no: 87654567
+        no: localStorage.getItem('browserID')
       }
       }
       this.checkLock(data).then(res => {
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
         if (res.data.code == 200) {

+ 1 - 1
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -3324,7 +3324,7 @@ export default {
         moduleName: 'xs',
         moduleName: 'xs',
         tableName: 'business_order',
         tableName: 'business_order',
         billId: this.form.id,
         billId: this.form.id,
-        no: 87654567
+        no: localStorage.getItem('browserID')
       }
       }
       this.saveLoading = true
       this.saveLoading = true
       this.checkLock(data).then(res => {
       this.checkLock(data).then(res => {

+ 1 - 1
src/views/businessManagement/salesOrder/index.vue

@@ -309,7 +309,7 @@ export default {
         moduleName: 'xs',
         moduleName: 'xs',
         tableName: 'business_order',
         tableName: 'business_order',
         billId: row.id,
         billId: row.id,
-        no: 87654567
+        no: localStorage.getItem('browserID')
       }
       }
       this.checkLock(data).then(res => {
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
         if (res.data.code == 200) {

+ 1 - 1
src/views/financialManagement/paymentSettle/paymentSettle.vue

@@ -133,7 +133,7 @@
           moduleName: 'ff',
           moduleName: 'ff',
           tableName: 'finance_settlement',
           tableName: 'finance_settlement',
           billId: row.id,
           billId: row.id,
-          no: 1
+          no: localStorage.getItem('browserID')
         }
         }
         this.checkLock(data).then(res => {
         this.checkLock(data).then(res => {
           if (res.data.code == 200) {
           if (res.data.code == 200) {

+ 1 - 1
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -700,7 +700,7 @@
           moduleName: 'ff',
           moduleName: 'ff',
           tableName: 'finance_settlement',
           tableName: 'finance_settlement',
           billId: this.form.id,
           billId: this.form.id,
-          no: 1
+          no: localStorage.getItem('browserID')
         }
         }
         this.checkLock(data).then(res => {
         this.checkLock(data).then(res => {
           if (res.data.code == 200) {
           if (res.data.code == 200) {

+ 1 - 1
src/views/financialManagement/receiptSettle/receiptSettle.vue

@@ -120,7 +120,7 @@
           moduleName: 'sf',
           moduleName: 'sf',
           tableName: 'finance_settlement',
           tableName: 'finance_settlement',
           billId: row.id,
           billId: row.id,
-          no: 1
+          no: localStorage.getItem('browserID')
         }
         }
         this.checkLock(data).then(res => {
         this.checkLock(data).then(res => {
           if (res.data.code == 200) {
           if (res.data.code == 200) {

+ 1 - 1
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -727,7 +727,7 @@
           moduleName: 'sf',
           moduleName: 'sf',
           tableName: 'finance_settlement',
           tableName: 'finance_settlement',
           billId: this.form.id,
           billId: this.form.id,
-          no: 1
+          no: localStorage.getItem('browserID')
         }
         }
         this.checkLock(data).then(res => {
         this.checkLock(data).then(res => {
           if (res.data.code == 200) {
           if (res.data.code == 200) {

+ 188 - 0
src/views/system/lock/index.vue

@@ -0,0 +1,188 @@
+<template>
+  <div>
+    <basic-container>
+      <avue-crud
+        :option="option"
+        :data="dataList"
+        ref="crud"
+        v-model="form"
+        :page.sync="page"
+        :search.sync="search"
+        @search-change="searchChange"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @on-load="onLoad"
+        :table-loading="loading"
+      >
+        <template slot="moudleNameSearch">
+          <el-select
+            v-model="search.moudleName"
+            clearable
+            filterable
+          >
+            <el-option
+              v-for="(item, index) in moudleOption"
+              :label="item.label"
+              :value="item.value"
+              :key="item.value"
+            ></el-option>
+          </el-select>
+        </template>
+        <template slot-scope="scope" slot="moudleName">
+          <span>{{ scope.row.moudleName | moudleNameFormat(moudleOption) }}</span>
+        </template>
+        <template slot="menu" slot-scope="{ row, index }">
+          <el-button
+            type="text"
+            icon="el-icon-unlock"
+            size="small"
+            @click="rowUnlock(row, index)"
+          >解锁</el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import option from "./config/mainList.json";
+import {lockList, lockRemove} from "@/api/lock/lock";
+
+export default {
+  name: "index",
+  data() {
+    return {
+      option: {},
+      dataList: [],
+      form: {},
+      page: {
+        pageSize: 10,
+        pagerCount: 5,
+        total: 0,
+      },
+      search: {},
+      loading: false,
+      moudleOption: [
+        {
+          label: '销售',
+          value: 'xs'
+        },
+        {
+          label: '采购',
+          value: 'cg'
+        },
+        {
+          label: '发货',
+          value: 'fh'
+        },
+        {
+          label: '收货',
+          value: 'sh'
+        },
+        {
+          label: '收费',
+          value: 'sf'
+        },
+        {
+          label: '付费',
+          value: 'ff'
+        },
+        {
+          label: '进项',
+          value: 'jx'
+        },
+        {
+          label: '销项',
+          value: 'xx'
+        },
+      ]
+    }
+  },
+  created() {
+    this.option = option
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0){
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  filters: {
+    moudleNameFormat(row, moudleOption) {
+      let name;
+      moudleOption.map((e) => {
+        if (row == e.value) {
+          name = e.label
+        }
+      });
+      return name;
+    },
+  },
+  methods: {
+    searchChange(params, done) {
+      this.onLoad(this.page, params);
+      done();
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    refreshChange() {
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false)
+      })
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.search);
+    },
+    onLoad(page, params) {
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false)
+      })
+      this.loading = true;
+      lockList(page.currentPage, page.pageSize, params)
+        .then(res => {
+          this.dataList = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 260;
+          }
+          this.dataList.forEach(item => {
+            this.$set(item,'insideList',[])
+            this.$set(item,'loading', true)
+          })
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    // 解锁
+    rowUnlock(row, index) {
+      this.$confirm('是否确认解锁?', '提示', {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        return lockRemove({ids: row.id})
+      }).then(() => {
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        this.page.currentPage = 1;
+        this.onLoad(this.page, {parentId: 0});
+      })
+    },
+  },
+}
+</script>
+
+<style scoped>
+
+</style>