Explorar el Código

[齐套率] - 维护邮件发送通知

liangyan0105 hace 3 años
padre
commit
7e8b0778ec

+ 1 - 2
src/views/packing-list/packinglist-clothes/clothes-list.vue

@@ -61,11 +61,10 @@
       <a-button type="primary" @click="openClothesAdd" icon="plus">新增</a-button>
     </div>
 
-    <!-- table  y: 300 -->
+    <!-- table  y: 300  rowKey="id"-->
     <div>
       <a-table
         bordered
-        rowKey="id"
         :columns="clothesListColumns"
         :data-source="clothesListData"
         :loading="loading"

+ 435 - 0
src/views/reportForms/full-rate-table.vue

@@ -0,0 +1,435 @@
+<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 :md="6" :sm="8">
+            <a-form-item label="开始年月">
+              <!--  :disabled-date="disabledDate" 不可选择的日期 -->
+              <a-month-picker placeholder="请选择开始年月" style="width:100%;" v-model="queryParam.startYearMonth" />
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="结束年月">
+              <a-month-picker placeholder="请选择结束年月" style="width:100%;" v-model="queryParam.endYearMonth" />
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="区间(天)">
+              <a-input placeholder="请输入区间" v-model="queryParam.sectionData"></a-input>
+            </a-form-item>
+          </a-col>
+
+          <template v-if="toggleSearchStatus">
+            <a-col :md="6" :sm="8">
+              <a-form-item label="部门">
+                <a-input placeholder="请输入部门" v-model="queryParam.department"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="出库齐套">
+                <a-input placeholder="请输入出库齐套" v-model="queryParam.outboundSet"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="来源订单号">
+                <a-input placeholder="请输入出库齐套" v-model="queryParam.sourceOrderNo"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="销售订单数量">
+                <a-input placeholder="请输入出库齐套" v-model="queryParam.salesOrderQuantity"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="订单编号">
+                <a-input placeholder="请输入订单编号" v-model="queryParam.orderNum"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="订单数量">
+                <a-input placeholder="请输入订单数量" v-model="queryParam.orderQuantity"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="颜色">
+                <a-input placeholder="请输入颜色" v-model="queryParam.color"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="交期">
+                <a-date-picker
+                  placeholder="请选择交期"
+                  @change="shipDateChange"
+                  style="width: 100%"
+                  v-model="queryParam.deliveryDate"
+                />
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="业务员">
+                <a-input placeholder="请输入业务员" v-model="queryParam.salesman"></a-input>
+              </a-form-item>
+            </a-col>
+          </template>
+
+          <a-col :md="6" :sm="8">
+            <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>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 邮件 分析图-->
+    <div class="table-operator">
+      <a-button type="primary" icon="bell" @click="emailMsgMod">维护邮件发送通知</a-button>
+      <a-button type="primary" @click="checkMonth" icon="line-chart">查看分析图-月份</a-button>
+      <a-button type="primary" @click="checkdepartment" icon="bar-chart">查看分析图-部门</a-button>
+    </div>
+
+    <!-- table rowKey="id" -->
+    <div>
+      <a-table
+        bordered
+        :columns="fullrateColumns"
+        :data-source="fullrateData"
+        :loading="loading"
+        :row-key="record => record.id"
+        :scroll="{ x: 1500 }"
+      >
+      </a-table>
+    </div>
+    <!-- 维护邮件发送通知 -->
+    <emailMsg-modal ref="emailMsgModal" :father="aa"></emailMsg-modal>
+  </a-card>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+
+import emailMsgModal from '@views/reportForms/full-rate-table/emailMsgModal.vue'
+
+export default {
+  name: 'Fullratetable', // 齐套率统计表
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment, emailMsgModal },
+
+  data() {
+    let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+
+    return {
+      // 齐套率统计表 表头
+      fullrateColumns: [
+        {
+          title: '出库齐套',
+          dataIndex: 'outboundSet',
+          width: 120,
+          fixed: 'left',
+          className: 'replacecolor'
+        },
+        {
+          title: '来源订单号',
+          dataIndex: 'sourceOrderNo',
+          width: 160,
+          fixed: 'left',
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+
+        {
+          title: '销售订单数量',
+          dataIndex: 'salesOrderQuantity',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '订单编号',
+          dataIndex: 'orderNum',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '订单数量',
+          dataIndex: 'orderQuantity',
+          width: 120,
+          className: 'replacecolor'
+        },
+
+        {
+          title: '颜色',
+          dataIndex: 'color',
+          width: 120,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+        {
+          title: '门幅',
+          dataIndex: 'larghezza',
+          width: 120,
+          className: 'replacecolor'
+        },
+        //  {
+        //   title: '创建时间',
+        //   dataIndex: 'createTime',
+        //   align: 'center',
+        //   sorter: true,
+        //   customRender: text => {
+        //     return moment(text).format('YYYY-MM-DD')
+        //   }
+        // },
+        {
+          title: '交期',
+          dataIndex: 'deliveryDate',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '部门',
+          dataIndex: 'department',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '业务员',
+          dataIndex: 'salesman',
+          width: 120,
+
+          className: 'replacecolor'
+        },
+        {
+          title: '存货名称',
+          dataIndex: 'inventoryName',
+          width: 120,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+
+        {
+          title: '存货编码',
+          dataIndex: 'cinvcode',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '子件用量',
+          dataIndex: 'dosageSon',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '存货上游订单数量',
+          dataIndex: 'upstreamOrdersInventoryNum',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '累计出库数量',
+          dataIndex: 'outQuantityTotal',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '累计准时出库数量',
+          dataIndex: 'outQuantityOnTime',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '累计延迟出库数量',
+          dataIndex: 'outQuantityLate',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '未出库数量',
+          dataIndex: 'notOutQuantity',
+          width: 120,
+          className: 'replacecolor'
+        },
+        //  {
+        //   title: '创建时间',
+        //   dataIndex: 'createTime',
+        //   align: 'center',
+        //   sorter: true,
+        //   customRender: text => {
+        //     return moment(text).format('YYYY-MM-DD')
+        //   }
+        // },
+        {
+          title: '预计发货日期',
+          dataIndex: 'estimatedShipDate',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '最早出库日期',
+          dataIndex: 'earliestOutdate',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '最晚出库日期',
+          dataIndex: 'latestOutDate',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '出库率',
+          dataIndex: 'outRate',
+          width: 90,
+          fixed: 'right',
+          className: 'replacecolor'
+        },
+        {
+          title: '区间出库率',
+          dataIndex: 'sectionOutRate',
+          width: 120,
+          fixed: 'right',
+          className: 'replacecolor'
+        },
+        {
+          title: '齐套率',
+          dataIndex: 'fullRate',
+          width: 90,
+          fixed: 'right',
+          className: 'replacecolor'
+        }
+      ],
+      fullrateData: [
+        {
+          sourceOrderNo: 'AW21-PRU-19081-CHARCOAL-PH2RPT',
+          orderNum: 'SYM632',
+          orderQuantity: '570',
+          color: '80#麻灰 CHARCOAL',
+          inventoryName: 'PRI D6 主标 PM3001A',
+          cinvcode: '0600000054',
+          estimatedShipDate: '2021/9/24',
+          outRate: '100',
+          outQuantityOnTime: '3,240.00',
+          fullRate: '100.00'
+        },
+        {},
+        {},
+        {}
+      ],
+      loading: false, // 表格加载
+
+      // 查询条件
+      queryParam: {
+        startYearMonth: '',
+        endYearMonth: '',
+        sectionData: '', // 区间
+        department: '',
+        outboundSet: '', // 出库齐套
+        sourceOrderNo: '', // 来源订单号
+        salesOrderQuantity: '', // 销售订单数量
+        orderNum: '', // 订单编号
+        orderQuantity: '', // 订单数量
+        color: '',
+        deliveryDate: '', // 交期
+        salesman: '' // 业务员
+      },
+
+      url: {
+        // syncUser: '/act/process/extActProcess/doSyncUser',
+        list: '/sys/user/list',
+        // delete: '/sys/user/delete',
+        // deleteBatch: '/sys/user/deleteBatch',
+        exportXlsUrl: '/sys/user/exportXls', // 导出
+        importExcelUrl: 'sys/user/importExcel' // 导入
+      }
+    }
+  },
+  created() {
+    // this.getAdPaListClothes()
+  },
+  methods: {
+    // 邮件通知
+    emailMsgMod() {
+          this.$refs.emailMsgModal.emailMsgModVis = true
+    },
+    // 分析图- 月份
+    checkMonth() {},
+    // 分析图- 部门
+    checkdepartment() {},
+
+    searchQuery() {
+      // this.getAnnList() // 渲染公告
+    },
+    // 重置
+    searchReset() {
+      this.queryParam = {}
+      // this.getAnnList()
+    },
+
+    // 选中行
+    // onSelectChange(keys, rows) {
+    //   this.selectedRowKeys = keys
+    //   this.selectedRows = rows
+    // },
+    // 分页、排序、筛选变化时触发
+    // handleTableChange(pagination, filters, sorter) {
+    //   // console.log('当前页信息>>>>',pagination)
+    //   this.queryParam.pageNo = pagination.current
+    //   // this.getAnnList()
+    // }
+
+    aa() {}
+  },
+  computed: {
+    // 选中项
+    rowSelection() {
+      return {
+        onChange: (selectedRowKeys, selectedRows) => {
+          console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
+        },
+        getCheckboxProps: record => ({
+          props: {
+            disabled: record.title === 'Disabled User',
+            // Column configuration not to be checked
+            title: record.title
+          }
+        })
+      }
+    }
+  },
+  mounted() {}
+}
+</script>
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+@import '~@assets/less/overwriter.less';
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+
+// /deep/ th.replacecolor {
+//   background-color: #ccc;
+// }
+</style>

+ 229 - 0
src/views/reportForms/full-rate-table/emailMsgModal.vue

@@ -0,0 +1,229 @@
+<template>
+  <a-modal
+    title="维护邮件发送通知"
+    v-model="emailMsgModVis"
+    :confirmLoading="confirmLoading"
+    @ok="onSubmit"
+    @cancel="handleCancel"
+    width="60%"
+    style="top:330px;left:100px;"
+  >
+    <!-- tabel 加载 -->
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="tableformRef" :model="form">
+        <a-table
+          :loading="loading"
+          bordered
+          :row-key="record => record.id"
+          :pagination="ipagination"
+          @change="handleTableChange"
+          :columns="emailMsgColumns"
+          :data-source="form.emailMsgData"
+        >
+          <template slot="isEnable" slot-scope="text, record, index">
+            <a-form-model-item prop="isEnable" :rules="rules.isEnable">
+              <a-select v-model="record.isEnable">
+                <a-select-option :value="1">是</a-select-option>
+                <a-select-option :value="2">否</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </template>
+
+          <!-- 每周 -->
+          <template slot="weekly" slot-scope="text, record, index">
+            <a-form-model-item prop="weekly" :rules="rules.weekly">
+              <a-select v-model="record.weekly">
+                <a-select-option :value="1">周一</a-select-option>
+                <a-select-option :value="2">周二</a-select-option>
+                <a-select-option :value="3">周三</a-select-option>
+                <a-select-option :value="4">周四</a-select-option>
+                <a-select-option :value="5">周五</a-select-option>
+                <a-select-option :value="6">周六</a-select-option>
+                <a-select-option :value="7">周日</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </template>
+
+          <!-- 每月 -->
+          <template slot="monthly" slot-scope="text, record, index">
+            <a-form-model-item prop="monthly" :rules="rules.monthly">
+              <a-input style="width:100%" type="number" :min="1" :max="31" v-model="record.monthly" />
+            </a-form-model-item>
+          </template>
+          <!-- 状态 -->
+          <!-- slot-scope="text, record" -->
+          <span slot="state">
+            <!-- v-if="record.isRelease == '0'" -->
+            <a-tag color="orange">已发送</a-tag>
+            <!-- <a-tag color="#87d068" v-else>仅保存</a-tag> -->
+          </span>
+
+          <!-- 操作 确定 取消 -->
+          <span slot="operationSlot" slot-scope="text, record">
+            <a @click="send(record)" style="color:green;">发送</a>
+            <a-divider type="vertical" />
+            <a @click="save(record)">保存</a>
+          </span>
+        </a-table>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+
+export default {
+  name: 'EmailMsgModal', // 维护邮件发送通知
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+
+  data() {
+    return {
+      loading: false, // 表格加载
+      // 表头
+      emailMsgColumns: [
+        {
+          title: '接收方',
+          dataIndex: 'acceptor',
+          width: 160,
+          className: 'replacecolor'
+        },
+        {
+          title: '是否启用',
+          dataIndex: 'isEnable',
+          width: 90,
+          scopedSlots: { customRender: 'isEnable' },
+          className: 'replacecolor'
+        },
+        // {
+        //   title: '创建时间',
+        //   dataIndex: 'createTime',
+        //   align: 'center',
+        //   sorter: true,
+        //   customRender: text => {
+        //     return moment(text).format('YYYY-MM-DD')
+        //   }
+        // },
+
+        {
+          title: '每周',
+          dataIndex: 'weekly',
+          width: 100,
+          scopedSlots: { customRender: 'weekly' },
+          className: 'replacecolor'
+        },
+
+        {
+          title: '每月',
+          dataIndex: 'monthly',
+          width: 90,
+          scopedSlots: { customRender: 'monthly' },
+          className: 'replacecolor'
+        },
+        {
+          title: '状态',
+          dataIndex: 'state',
+          width: 60,
+          scopedSlots: { customRender: 'state' },
+          className: 'replacecolor'
+        },
+        {
+          title: '操作',
+          dataIndex: 'operation',
+          scopedSlots: { customRender: 'operationSlot' },
+          width: 90,
+          className: 'replacecolor'
+        }
+      ],
+      form: {
+        emailMsgData: [{ acceptor: '销售部' }, { acceptor: '财务部门' }]
+      },
+
+      // orderDataform: this.$form.createForm(this),
+      confirmLoading: false,
+      emailMsgModVis: false,
+      // 三个选项
+      rules: {
+        isEnable: { required: true, message: '请选择', trigger: 'blur' },
+        weekly: { required: true, message: '请选择周几', trigger: 'blur' },
+        monthly: { required: true, message: '请输日期', trigger: 'blur' }
+      }
+    }
+  },
+  // 接收父组件 方法
+  props: {
+    father: {
+      type: Function,
+      default: null
+    }
+  },
+  created() {},
+  methods: {
+    // 操作按钮  发送
+    send(record) {
+      // 验证是否为空
+      this.$refs.tableformRef.validate(async valid => {
+        if (valid) {
+          console.log('发送')
+          console.log('record')
+          this.$message.success('保存成功')
+        }
+      })
+    },
+    // 操作按钮 保存
+    save(record) {
+      // 验证是否为空
+      this.$refs.tableformRef.validate(async valid => {
+        if (valid) {
+          console.log('保存')
+          console.log('record')
+          this.$message.success('保存成功')
+        }
+      })
+    },
+
+    // 弹框确定
+    onSubmit() {
+      console.log('弹框确定')
+      this.emailMsgModVis = false
+      this.record.isEnable = '' // 清空
+      console.log('清空输入、选择')
+      this.record.weekly = ''
+      console.log('eeee')
+      this.record.monthly = ''
+    },
+
+    // 弹框取消
+    handleCancel() {
+      this.emailMsgModVis = false
+      this.record.isEnable = '' // 清空
+      console.log('清空输入、选择')
+      this.record.weekly = ''
+      this.record.monthly = ''
+    }
+
+    // 选中行
+    // onSelectChange(keys, rows) {
+    //   this.selectedRowKeys = keys
+    //   this.selectedRows = rows
+    // },
+  },
+  computed: {}
+}
+</script>
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+// th.replacecolor {
+// background-color:  #ccc;
+// }
+</style>