jbb vor 2 Jahren
Ursprung
Commit
da04a44624
2 geänderte Dateien mit 590 neuen und 0 gelöschten Zeilen
  1. 295 0
      src/views/activiti/form/carSqModal.vue
  2. 295 0
      src/views/activiti/form/materialSlModal.vue

+ 295 - 0
src/views/activiti/form/carSqModal.vue

@@ -0,0 +1,295 @@
+<template>
+  <div id="carSqModal">
+    <a-modal
+      title=""
+      v-model="carSqModVis"
+      @cancel="handleCancel"
+      width="80%"
+      style="top:330px;left:100px;"
+    >
+
+      <!-- 増行 子表 -->
+      <a-card :bordered="false" style="margin:10px 0">
+        <!-- 子表 -->
+          <a-form-model ref="formRef">
+            <a-table
+              v-if="carSqZyData"
+              bordered
+              rowKey="id"
+              :columns="carSqColumns"
+              :data-source="carSqZyData"
+              :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+              :pagination="false"
+               :scroll="{x:2100,y: 300}"
+            >
+              
+            </a-table>
+          </a-form-model>
+      </a-card>
+
+      <!-- 页面底部保存取消 -->
+      <div
+        :style="{
+          position: 'absolute',
+          right: 0,
+          bottom: 0,
+          width: '100%',
+          borderTop: '1px solid #e9e9e9',
+          padding: '10px 16px',
+          background: '#fff',
+          textAlign: 'right',
+          zIndex: 1
+        }"
+      >
+        <a-popconfirm title="确定放弃?" @confirm="close" okText="确定" cancelText="取消">
+          <a-button :style="{ marginRight: '8px' }">返回</a-button>
+        </a-popconfirm>
+        <a-button type="primary" @click="addSave">
+          确认
+        </a-button>
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+import {getFixedZy} from '@api/oa/cd-personnel-files'
+
+export default {
+  name: 'CarSqModal', // 报关要素
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+
+  data() {
+    let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+
+    return {
+      loading: false, // 表格加载
+      pushState: false, //是否推送
+      // 子表表头
+      carSqColumns: [ 
+        {
+          title: '入库单号',
+          dataIndex: 'realname',
+          width: 140,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '资产类别',
+          dataIndex: 'assetsCategory',
+          width: 140,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+         {
+          title: '资产编号',
+          dataIndex: 'assetNumber',
+          width: 130,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '资产名称',
+          dataIndex: 'assetName',
+          width: 130,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+
+        {
+          title: '规则型号',
+          dataIndex: 'specificationsModels',
+          width: 130,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '品牌',
+          dataIndex: 'brand',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '单位',
+          dataIndex: 'unit',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '价值',
+          dataIndex: 'unitPrice',
+          ellipsis: true,
+          width: 180,
+          className: 'replacecolor'
+        },
+        {
+          title: '购置日期',
+          dataIndex: 'acquisitionDate',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '厂家',
+          dataIndex: 'manufacturer',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+         {
+          title: '使用部门',
+          dataIndex: 'useDepartment',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '入库时间',
+          dataIndex: 'inputDate',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '采购人',
+          dataIndex: 'purchasingStaff',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '采购人',
+          dataIndex: 'acceptPersonnel: ',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '其他说明',
+          dataIndex: 'otherDescription',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '采购单号',
+          dataIndex: 'buyid',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '资产状态',
+          dataIndex: 'assetState',
+          width: 90,
+          className: 'replacecolor',
+        },
+      ],
+      carSqZyData: [ ], // 子表信息
+      carSqModVis: false,
+      selectedRowKeys:[],
+      selectedRows:[],
+      sat:''
+    }
+  },
+  // 接收父组件 方法
+  props: {},
+
+  created() {  
+  },
+  methods: {
+    personLists(value){
+      getFixedZy({state:value}).then(res => {
+                    if (res.success) {
+                      this.carSqZyData = res.result
+                    }else{
+                       this.$message.error(res.message);
+                    }
+                })
+    },
+    close() {
+      this.$emit('close-declare')
+      this.carSqModVis = false
+      this.declareElements = {}
+      this.declareElementsData = []
+      this.selectedRowKeys = [],
+      this.sat = ''
+    },
+    handleCancel() {
+      this.close()
+    },
+    onSelectChange(keys,rows){
+      this.selectedRowKeys = keys;
+      this.selectedRows = rows;
+    },
+    addSave(){
+        if(this.selectedRowKeys.length == 0){
+          this.$message.error('请勾选数据');
+        }else if(this.selectedRowKeys.length >1){
+          this.$message.error('一次只可勾选一行数据');
+        }else{
+          if(this.sat == '转移'){
+            var data ={
+            assets_category : this.selectedRows[0].assetsCategory,
+            asset_encoding:this.selectedRows[0].assetNumber,
+            asset_name:this.selectedRows[0].assetName,
+            specifications_models:this.selectedRows[0].specificationsModels
+           }
+          }else if(this.sat == '归还'){
+            var data ={
+            assets_category : this.selectedRows[0].assetsCategory,
+            asset_encoding:this.selectedRows[0].assetNumber,
+            asset_name:this.selectedRows[0].assetName,
+            specifications_models:this.selectedRows[0].specificationsModels
+           }
+          }else if(this.sat == '调拨'){
+            var data ={
+            asset_encoding:this.selectedRows[0].assetNumber,
+            assets_category : this.selectedRows[0].assetsCategory,
+            asset_name:this.selectedRows[0].assetName,
+            specifications_models:this.selectedRows[0].specificationsModels
+           }
+          }else if(this.sat == '报废'){
+            var data ={
+            asset_encoding:this.selectedRows[0].assetNumber,
+            assets_category : this.selectedRows[0].assetsCategory,
+            asset_name:this.selectedRows[0].assetName,
+            specifications_models:this.selectedRows[0].specificationsModels
+           }
+          }
+          
+          this.$emit('close',data)
+          this.close()
+        }
+    }
+  },
+
+  computed: {}
+}
+</script>
+<style lang="less" scoped>
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+// th.replacecolor {
+// background-color:  #ccc;
+// }
+// 对话框里的card样式
+/deep/ .ant-modal-content {
+  background-color: #f0f2f5;
+}
+/deep/ .ant-modal-body {
+  padding: 10px;
+}
+/deep/.ant-form-item{
+  margin-bottom: 0px !important;
+}
+/deep/.ant-table-scroll {
+    word-break: break-all;
+}
+</style>

+ 295 - 0
src/views/activiti/form/materialSlModal.vue

@@ -0,0 +1,295 @@
+<template>
+  <div id="materialSlModal">
+    <a-modal
+      title=""
+      v-model="materialSlModVis"
+      @cancel="handleCancel"
+      width="80%"
+      style="top:330px;left:100px;"
+    >
+
+      <!-- 増行 子表 -->
+      <a-card :bordered="false" style="margin:10px 0">
+        <!-- 子表 -->
+          <a-form-model ref="formRef">
+            <a-table
+              v-if="materialSlData"
+              bordered
+              rowKey="id"
+              :columns="materialSlColumns"
+              :data-source="materialSlData"
+              :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+              :pagination="false"
+               :scroll="{x:2100,y: 300}"
+            >
+              
+            </a-table>
+          </a-form-model>
+      </a-card>
+
+      <!-- 页面底部保存取消 -->
+      <div
+        :style="{
+          position: 'absolute',
+          right: 0,
+          bottom: 0,
+          width: '100%',
+          borderTop: '1px solid #e9e9e9',
+          padding: '10px 16px',
+          background: '#fff',
+          textAlign: 'right',
+          zIndex: 1
+        }"
+      >
+        <a-popconfirm title="确定放弃?" @confirm="close" okText="确定" cancelText="取消">
+          <a-button :style="{ marginRight: '8px' }">返回</a-button>
+        </a-popconfirm>
+        <a-button type="primary" @click="addSave">
+          确认
+        </a-button>
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+import {getFixedZy} from '@api/oa/cd-personnel-files'
+
+export default {
+  name: 'MaterialSlModal', // 报关要素
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+
+  data() {
+    let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+
+    return {
+      loading: false, // 表格加载
+      pushState: false, //是否推送
+      // 子表表头
+      materialSlColumns: [ 
+        {
+          title: '入库单号',
+          dataIndex: 'realname',
+          width: 140,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '资产类别',
+          dataIndex: 'assetsCategory',
+          width: 140,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+         {
+          title: '资产编号',
+          dataIndex: 'assetNumber',
+          width: 130,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '资产名称',
+          dataIndex: 'assetName',
+          width: 130,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+
+        {
+          title: '规则型号',
+          dataIndex: 'specificationsModels',
+          width: 130,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '品牌',
+          dataIndex: 'brand',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '单位',
+          dataIndex: 'unit',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '价值',
+          dataIndex: 'unitPrice',
+          ellipsis: true,
+          width: 180,
+          className: 'replacecolor'
+        },
+        {
+          title: '购置日期',
+          dataIndex: 'acquisitionDate',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '厂家',
+          dataIndex: 'manufacturer',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+         {
+          title: '使用部门',
+          dataIndex: 'useDepartment',
+          width: 120,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
+        {
+          title: '入库时间',
+          dataIndex: 'inputDate',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '采购人',
+          dataIndex: 'purchasingStaff',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '采购人',
+          dataIndex: 'acceptPersonnel: ',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '其他说明',
+          dataIndex: 'otherDescription',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '采购单号',
+          dataIndex: 'buyid',
+          width: 90,
+          className: 'replacecolor',
+        },
+        {
+          title: '资产状态',
+          dataIndex: 'assetState',
+          width: 90,
+          className: 'replacecolor',
+        },
+      ],
+      materialSlData: [ ], // 子表信息
+      materialSlModVis: false,
+      selectedRowKeys:[],
+      selectedRows:[],
+      sat:''
+    }
+  },
+  // 接收父组件 方法
+  props: {},
+
+  created() {  
+  },
+  methods: {
+    personLists(value){
+      getFixedZy({state:value}).then(res => {
+                    if (res.success) {
+                      this.materialSlData = res.result
+                    }else{
+                       this.$message.error(res.message);
+                    }
+                })
+    },
+    close() {
+      this.$emit('close-declare')
+      this.materialSlModVis = false
+      this.declareElements = {}
+      this.declareElementsData = []
+      this.selectedRowKeys = [],
+      this.sat = ''
+    },
+    handleCancel() {
+      this.close()
+    },
+    onSelectChange(keys,rows){
+      this.selectedRowKeys = keys;
+      this.selectedRows = rows;
+    },
+    addSave(){
+        if(this.selectedRowKeys.length == 0){
+          this.$message.error('请勾选数据');
+        }else if(this.selectedRowKeys.length >1){
+          this.$message.error('一次只可勾选一行数据');
+        }else{
+          if(this.sat == '转移'){
+            var data ={
+            assets_category : this.selectedRows[0].assetsCategory,
+            asset_encoding:this.selectedRows[0].assetNumber,
+            asset_name:this.selectedRows[0].assetName,
+            specifications_models:this.selectedRows[0].specificationsModels
+           }
+          }else if(this.sat == '归还'){
+            var data ={
+            assets_category : this.selectedRows[0].assetsCategory,
+            asset_encoding:this.selectedRows[0].assetNumber,
+            asset_name:this.selectedRows[0].assetName,
+            specifications_models:this.selectedRows[0].specificationsModels
+           }
+          }else if(this.sat == '调拨'){
+            var data ={
+            asset_encoding:this.selectedRows[0].assetNumber,
+            assets_category : this.selectedRows[0].assetsCategory,
+            asset_name:this.selectedRows[0].assetName,
+            specifications_models:this.selectedRows[0].specificationsModels
+           }
+          }else if(this.sat == '报废'){
+            var data ={
+            asset_encoding:this.selectedRows[0].assetNumber,
+            assets_category : this.selectedRows[0].assetsCategory,
+            asset_name:this.selectedRows[0].assetName,
+            specifications_models:this.selectedRows[0].specificationsModels
+           }
+          }
+          
+          this.$emit('close',data)
+          this.close()
+        }
+    }
+  },
+
+  computed: {}
+}
+</script>
+<style lang="less" scoped>
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+// th.replacecolor {
+// background-color:  #ccc;
+// }
+// 对话框里的card样式
+/deep/ .ant-modal-content {
+  background-color: #f0f2f5;
+}
+/deep/ .ant-modal-body {
+  padding: 10px;
+}
+/deep/.ant-form-item{
+  margin-bottom: 0px !important;
+}
+/deep/.ant-table-scroll {
+    word-break: break-all;
+}
+</style>