yuansh 2 years ago
parent
commit
f646004f37

+ 169 - 0
src/views/oa/SyCarryList.vue

@@ -0,0 +1,169 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="编码">
+              <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="名称">
+              <a-input placeholder="请输入名称" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <!-- <a-button type="primary" icon="download" @click="handleExportXls('搬运装卸费用-搬运工对账单')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i>
+        <span>已选择</span>
+        <a style="font-weight: 600">
+          {{ selectedRowKeys.length }}
+        </a>
+        <span>项</span>
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <syCarry-modal ref="modalForm" @ok="modalFormOk"/>
+
+  </a-card>
+</template>
+
+<script>
+
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import SyCarryModal from './modules/SyCarryModal'
+
+  export default {
+    name: "SyCarryList",
+    mixins: [JeecgListMixin],
+    components: {
+      SyCarryModal
+    },
+    data () {
+      return {
+        description: '搬运装卸费用-搬运工对账单-主表管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 60,
+            align: "center",
+            customRender:function (t, r, index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title: '名称',
+            align:"center",
+            dataIndex: 'name'
+          },
+          {
+            title: '编号',
+            align:"center",
+            dataIndex: 'code'
+          },
+          {
+            title: '备注',
+            align:"center",
+            dataIndex: 'demo'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+        // 请求参数
+    	url: {
+              list: "/oa/syCarry/list",
+              delete: "/oa/syCarry/delete",
+              deleteBatch: "/oa/syCarry/deleteBatch",
+              exportXlsUrl: "oa/syCarry/exportXls",
+              importExcelUrl: "oa/syCarry/importExcel",
+           },
+        }
+      },
+      computed: {
+        importExcelUrl: function(){
+          return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+        }
+      },
+
+
+    methods: {
+
+      initDictConfig() {
+      }
+
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 169 - 0
src/views/oa/SyCottonYarnList.vue

@@ -0,0 +1,169 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="编码">
+              <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="名称">
+              <a-input placeholder="请输入名称" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+     <!-- <a-button type="primary" icon="download" @click="handleExportXls('搬运装卸费用-棉纱')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i>
+        <span>已选择</span>
+        <a style="font-weight: 600">
+          {{ selectedRowKeys.length }}
+        </a>
+        <span>项</span>
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <syCottonYarn-modal ref="modalForm" @ok="modalFormOk"/>
+
+  </a-card>
+</template>
+
+<script>
+
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import SyCottonYarnModal from './modules/SyCottonYarnModal'
+
+  export default {
+    name: "SyCottonYarnList",
+    mixins: [JeecgListMixin],
+    components: {
+      SyCottonYarnModal
+    },
+    data () {
+      return {
+        description: '搬运装卸费用-棉纱-主表管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 60,
+            align: "center",
+            customRender:function (t, r, index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title: '名称',
+            align:"center",
+            dataIndex: 'name'
+          },
+          {
+            title: '编号',
+            align:"center",
+            dataIndex: 'code'
+          },
+          {
+            title: '备注',
+            align:"center",
+            dataIndex: 'demo'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+        // 请求参数
+    	url: {
+              list: "/oa/syCottonYarn/list",
+              delete: "/oa/syCottonYarn/delete",
+              deleteBatch: "/oa/syCottonYarn/deleteBatch",
+              exportXlsUrl: "oa/syCottonYarn/exportXls",
+              importExcelUrl: "oa/syCottonYarn/importExcel",
+           },
+        }
+      },
+      computed: {
+        importExcelUrl: function(){
+          return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+        }
+      },
+
+
+    methods: {
+
+      initDictConfig() {
+      }
+
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 202 - 0
src/views/oa/modules/SyCarryModal.vue

@@ -0,0 +1,202 @@
+<template>
+  <a-modal
+    :title="title"
+    width="85%"
+    :visible="visible"
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel">
+    <a-spin :spinning="confirmLoading">
+      <!-- 主表单区域 -->
+      <a-form :form="form">
+        <a-row>
+          <a-col :span="12">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="编号">
+              <a-input placeholder="请输入编号" v-decorator="['code', {}]"/>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="名称">
+              <a-input placeholder="请输入名称" v-decorator="['name', {}]"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="备注">
+              <a-input type="textarea" placeholder="请输入备注" v-decorator="['demo', {}]"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+
+      <!-- 子表单区域 -->
+      <a-tabs v-model="activeKey" @change="handleChangeTabs">
+        <a-tab-pane tab="搬运工对账单" :key="refKeys[0]" :forceRender="true">
+          <j-editable-table
+            :ref="refKeys[0]"
+            :loading="syCarryBTable.loading"
+            :columns="syCarryBTable.columns"
+            :dataSource="syCarryBTable.dataSource"
+            :maxHeight="300"
+            :rowNumber="true"
+            :rowSelection="true"
+            :actionButton="true"/>
+        </a-tab-pane>
+      </a-tabs>
+
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+
+  import moment from 'moment'
+  import pick from 'lodash.pick'
+  import { FormTypes } from '@/utils/JEditableTableUtil'
+  import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
+
+  export default {
+    name: 'SyCarryModal',
+    mixins: [JEditableTableMixin],
+    data() {
+      return {
+        // 新增时子表默认添加几行空数据
+        addDefaultRowNum: 1,
+        validatorRules: {
+        },
+        refKeys: ['syCarryB', ],
+        activeKey: 'syCarryB',
+        // 搬运装卸费用-搬运工对账单-子表
+        syCarryBTable: {
+          loading: false,
+          dataSource: [],
+          columns: [
+            
+            {
+              title: '日期',
+              key: 'orderDate',
+              type: FormTypes.datetime,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '总件数',
+              key: 'allNum',
+              type: FormTypes.inputNumber,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '明细',
+              key: 'detailedNum',
+              type: FormTypes.inputNumber,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '衣架',
+              key: 'coatHanger',
+              type: FormTypes.inputNumber,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '集装箱号',
+              key: 'containerNo',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '发票号',
+              key: 'invoiceNo',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '价格',
+              key: 'price',
+              type: FormTypes.inputNumber,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '计划员',
+              key: 'jhyName',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '签名',
+              key: 'jhyNameData',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '备注',
+              key: 'demo',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+          ]
+        },
+        url: {
+          add: "/oa/syCarry/add",
+          edit: "/oa/syCarry/edit",
+          syCarryB: {
+            list: '/oa/syCarry/querySyCarryBByMainId'
+          },
+        }
+      }
+    },
+    methods: {
+ 
+      /** 调用完edit()方法之后会自动调用此方法 */
+      editAfter() {
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model, 'name', 'code', 'demo', ))
+          // 时间格式化
+          // this.form.setFieldsValue({ ckTime: this.model.ckTime ? moment(this.model.ckTime) : null })
+          // this.form.setFieldsValue({ rsxzTime: this.model.rsxzTime ? moment(this.model.rsxzTime) : null })
+          // this.form.setFieldsValue({ cwjlTime: this.model.cwjlTime ? moment(this.model.cwjlTime) : null })
+        })
+        // 加载子表数据
+        if (this.model.id) {
+          let params = { id: this.model.id }
+          this.requestSubTableData(this.url.syCarryB.list, params, this.syCarryBTable)
+        }
+      },
+ 
+      /** 整理成formData */
+      classifyIntoFormData(allValues) {
+        let main = Object.assign(this.model, allValues.formValue)
+        //时间格式化
+        // main.ckTime = main.ckTime ? main.ckTime.format('YYYY-MM-DD HH:mm:ss') : null;
+        // main.rsxzTime = main.rsxzTime ? main.rsxzTime.format('YYYY-MM-DD HH:mm:ss') : null;
+        // main.cwjlTime = main.cwjlTime ? main.cwjlTime.format('YYYY-MM-DD HH:mm:ss') : null;
+        return {
+          ...main, // 展开
+          syCarryBList: allValues.tablesValue[0].values,
+        }
+      }
+    }
+  }
+</script>
+
+<style scoped>
+</style>

+ 203 - 0
src/views/oa/modules/SyCottonYarnModal.vue

@@ -0,0 +1,203 @@
+<template>
+  <a-modal
+    :title="title"
+    width="85%"
+    :visible="visible"
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel">
+    <a-spin :spinning="confirmLoading">
+      <!-- 主表单区域 -->
+      <a-form :form="form">
+        
+        <a-row>
+          <a-col :span="12">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="名称">
+              <a-input placeholder="请输入名称" v-decorator="['name', {}]"/>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="编号">
+              <a-input placeholder="请输入编号" v-decorator="['code', {}]"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="备注">
+              <a-input type="textarea" placeholder="请输入备注" v-decorator="['demo', {}]"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        
+      </a-form>
+
+      <!-- 子表单区域 -->
+      <a-tabs v-model="activeKey" @change="handleChangeTabs">
+        <a-tab-pane tab="棉纱" :key="refKeys[0]" :forceRender="true">
+          <j-editable-table
+            :ref="refKeys[0]"
+            :loading="syCottonYarnBTable.loading"
+            :columns="syCottonYarnBTable.columns"
+            :dataSource="syCottonYarnBTable.dataSource"
+            :maxHeight="300"
+            :rowNumber="true"
+            :rowSelection="true"
+            :actionButton="true"/>
+        </a-tab-pane>
+      </a-tabs>
+
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+
+  import moment from 'moment'
+  import pick from 'lodash.pick'
+  import { FormTypes } from '@/utils/JEditableTableUtil'
+  import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
+
+  export default {
+    name: 'SyCottonYarnModal',
+    mixins: [JEditableTableMixin],
+    data() {
+      return {
+        // 新增时子表默认添加几行空数据
+        addDefaultRowNum: 1,
+        validatorRules: {
+        },
+        refKeys: ['syCottonYarnB', ],
+        activeKey: 'syCottonYarnB',
+        // 搬运装卸费用-棉纱-子表
+        syCottonYarnBTable: {
+          loading: false,
+          dataSource: [],
+          columns: [
+            {
+              title: '日期',
+              key: 'orderDate',
+              type: FormTypes.datetime,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '入库单号',
+              key: 'receiptNo',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '吨数',
+              key: 'tonnage',
+              type: FormTypes.inputNumber,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '柜子数量',
+              key: 'cabinets',
+              type: FormTypes.inputNumber,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '每吨纱价格',
+              key: 'price',
+              type: FormTypes.inputNumber,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '集装箱号',
+              key: 'containerNo',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '原因',
+              key: 'reason',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '总价',
+              key: 'totalPrice',
+              type: FormTypes.inputNumber,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '签字',
+              key: 'jhyName',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+            {
+              title: '备注',
+              key: 'demo',
+              type: FormTypes.input,
+              defaultValue: '',
+              placeholder: '请输入${title}',
+            },
+          ]
+        },
+        url: {
+          add: "/oa/syCottonYarn/add",
+          edit: "/oa/syCottonYarn/edit",
+          syCottonYarnB: {
+            list: '/oa/syCottonYarn/querySyCottonYarnBByMainId'
+          },
+        }
+      }
+    },
+    methods: {
+ 
+      /** 调用完edit()方法之后会自动调用此方法 */
+      editAfter() {
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model, 'name', 'code', 'demo', ))
+          // 时间格式化
+          // this.form.setFieldsValue({ ckTime: this.model.ckTime ? moment(this.model.ckTime) : null })
+          // this.form.setFieldsValue({ rsxzTime: this.model.rsxzTime ? moment(this.model.rsxzTime) : null })
+          // this.form.setFieldsValue({ cwjlTime: this.model.cwjlTime ? moment(this.model.cwjlTime) : null })
+        })
+        // 加载子表数据
+        if (this.model.id) {
+          let params = { id: this.model.id }
+          this.requestSubTableData(this.url.syCottonYarnB.list, params, this.syCottonYarnBTable)
+        }
+      },
+ 
+      /** 整理成formData */
+      classifyIntoFormData(allValues) {
+        let main = Object.assign(this.model, allValues.formValue)
+        //时间格式化
+        // main.ckTime = main.ckTime ? main.ckTime.format('YYYY-MM-DD HH:mm:ss') : null;
+        // main.rsxzTime = main.rsxzTime ? main.rsxzTime.format('YYYY-MM-DD HH:mm:ss') : null;
+        // main.cwjlTime = main.cwjlTime ? main.cwjlTime.format('YYYY-MM-DD HH:mm:ss') : null;
+        return {
+          ...main, // 展开
+          syCottonYarnBList: allValues.tablesValue[0].values,
+        }
+      }
+    }
+  }
+</script>
+
+<style scoped>
+</style>

+ 9 - 0
src/views/system/SysAnnouncementList.vue

@@ -11,6 +11,15 @@
               <a-input placeholder="请输入标题" v-model="queryParam.titile"></a-input>
             </a-form-item>
           </a-col>
+          <a-col :span="6">
+            <a-form-item label="消息类型">
+              <a-select v-model="queryParam.msgCategory">
+                <a-select-option value="">全部</a-select-option>
+                <a-select-option value="1">通知公告</a-select-option>
+                <a-select-option value="2">系统消息</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
           <!--<a-col :span="6">
             <a-form-item label="内容">
               <a-input placeholder="请输入内容" v-model="queryParam.msgContent"></a-input>