cz před 11 měsíci
rodič
revize
fc5ee872fe

+ 3 - 2
src/components/byForm/index.vue

@@ -38,8 +38,9 @@
           </div>
           <el-select v-model="formData[i.prop]" :multiple="i.multiple || false" v-else-if="i.type == 'select'"
                      :placeholder="i.placeholder || $t('common.pleaseSelect')" @change="(e) => commonsEmit(e, i)"
-                     :disabled="i.disabled ? i.disabled : false" :clearable="i.clearable ? i.clearable : false"
-                     :filterable="i.filterable ? true : true" :style="i.style?i.style:{width:'100%'}" :readonly="i.readonly ? i.readonly : false">
+                     :disabled="i.disabled ? i.disabled : false" :clearable="i.clearable != undefined ? i.clearable : true"
+                     :filterable="i.filterable != undefined ? i.filterable : true" :style="i.style?i.style:{width:'100%'}"
+                     :readonly="i.readonly ? i.readonly : false">
             <el-option :label="j.dictValue || j.name || j.label" :value="j.dictKey||j.id || j.value" v-for="j in i.data"
                        :key="j.id || j.dictKey || j.value" :disabled="j.disabled ?j.disabled:false ">
             </el-option>

+ 1 - 2
src/components/contractCom/contractDetails.vue

@@ -54,12 +54,11 @@
           <div v-else></div>
         </template>
         <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <div>
             <span>{{ item.productLength }}</span>*
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productHeight }}</span>
           </div>
-          <div v-else></div>
         </template>
         <template #progress="{item}">
           <div style="width: 100%">

+ 2 - 2
src/components/product/SelectAllGood.vue

@@ -22,12 +22,12 @@
           </div>
         </template>
         <template #size="{ item }">
-          <div v-if="item['length'] && item.width && item.height">
+          <div>
             <span>{{ item['length'] }}cm</span>*
             <span>{{ item.width }}cm</span>*
             <span>{{ item.height }}cm</span>
           </div>
-          <div v-else></div>
+
         </template>
         <template #price="{ item }">
           <div v-if="item.price">

+ 2 - 2
src/components/product/SelectCompanyProduct.vue

@@ -23,12 +23,12 @@
           <div v-else></div>
         </template>
         <template #size="{ item }">
-          <div v-if="item['length'] && item.width && item.height">
+          <div>
             <span>{{ item['length'] }}cm</span>*
             <span>{{ item.width }}cm</span>*
             <span>{{ item.height }}cm</span>
           </div>
-          <div v-else></div>
+
         </template>
         <template #price="{ item }">
           <div v-if="item.price">

+ 6 - 6
src/components/product/SelectMaterial.vue

@@ -26,12 +26,12 @@
           </div>
         </template>
         <template #size="{ item }">
-          <div v-if="item['length'] && item.width && item.height">
+          <div>
             <span>{{ item['length'] }}</span>*
             <span>{{ item.width }}</span>*
             <span>{{ item.height }}</span>
           </div>
-          <div v-else></div>
+
         </template>
         <template #price="{ item }">
           <div v-if="item.price">
@@ -67,12 +67,12 @@
           </div>
         </template>
         <template #size="{ item }">
-          <div v-if="item['length'] && item.width && item.height">
+          <div>
             <span>{{ item['length'] }}</span>*
             <span>{{ item.width }}</span>*
             <span>{{ item.height }}</span>
           </div>
-          <div v-else></div>
+
         </template>
         <template #price="{ item }">
           <div v-if="item.price">
@@ -162,12 +162,12 @@
           </template>
 
           <template #size="{ item }">
-            <div v-if="item['length'] && item.width && item.height">
+            <div>
               <span>{{ item['length'] }}</span>*
               <span>{{ item.width }}</span>*
               <span>{{ item.height }}</span>
             </div>
-            <div v-else></div>
+
           </template>
 
         </byTable>

+ 2 - 2
src/components/product/SelectProduct.vue

@@ -23,12 +23,12 @@
           <div v-else></div>
         </template>
         <template #size="{ item }">
-          <div v-if="item['length'] && item.width && item.height">
+          <div>
             <span>{{ item['length'] }}cm</span>*
             <span>{{ item.width }}cm</span>*
             <span>{{ item.height }}cm</span>
           </div>
-          <div v-else></div>
+
         </template>
         <template #price="{ item }">
           <div v-if="item.price">

+ 2 - 2
src/views/EHSD/procurement/arrivalRecord/index.vue

@@ -13,12 +13,12 @@
         </template>
 
         <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <div>
             <span>{{ item.productLength }}</span>*
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productHeight }}</span>
           </div>
-          <div v-else></div>
+
         </template>
 
       </byTable>

+ 2 - 2
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -35,12 +35,12 @@
           <div v-else></div>
         </template>
         <template #size="{ item }">
-          <div v-if="item['length'] && item.width && item.height">
+          <div>
             <span>{{ item['length'] }}</span>*
             <span>{{ item.width }}</span>*
             <span>{{ item.height }}</span>
           </div>
-          <div v-else></div>
+
         </template>
         <template #price="{ item }">
           <div v-if="item.price">

+ 2 - 2
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -10,12 +10,12 @@
       </template>
 
       <template #size="{ item }">
-        <div v-if="item.productLength && item.productWidth && item.productHeight">
+        <div>
           <span>{{ item.productLength }}</span>*
           <span>{{ item.productWidth }}</span>*
           <span>{{ item.productHeight }}</span>
         </div>
-        <div v-else></div>
+
       </template>
       <template #price="{ item }">
         <div v-if="item.price">

+ 212 - 265
src/views/EHSD/saleContract/performanceSet/index.vue

@@ -1,305 +1,252 @@
 <template>
   <div class="pageIndexClass">
-    <div style="background-color: #fff; padding: 15px 15px 0">
-      <el-form :inline="true" :model="sourceList.pagination">
-        <el-form-item label="">
-          <el-radio-group v-model="sourceList.pagination.current" size="default" @change="changeCurrent">
-            <el-radio-button label="本日" />
-            <el-radio-button label="本周" />
-            <el-radio-button label="本月" />
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="其他">
-          <el-date-picker v-model="sourceList.pagination.beginTime" type="date" placeholder="开始日期" value-format="YYYY-MM-DD 00:00:00"
-                          :disabled-date="disabledFn" />
-          <div style="padding:0 10px">
-            -
+    <div>
+      <byTable :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :action-list="[]" :tableBorder="true" :span-method="objectSpanMethod"
+               @get-list="getList">
+        <template v-for="(month, index) in attrData" v-slot:[month]="{ item }" :key="month">
+          <div style="width:100%">
+            <el-input-number v-model="item[month]" :placeholder="''+monthData[index]+'月绩效'" onmousewheel="return false;" :precision="2"
+                             :controls="false" :min="0" @change="(val)=>handleChangeVal(item,month,val)" :disabled="getIsDisabled(index)"
+                             style="width:100%">
+            </el-input-number>
           </div>
-          <el-date-picker v-model="sourceList.pagination.endTime" type="date" placeholder="结束日期" value-format="YYYY-MM-DD 23:59:59"
-                          :disabled-date="disabledFn" />
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="onQuery" class="query">搜索</el-button>
-          <el-button @click="onReset">重置</el-button>
-          <el-button type="primary" @click="exportExcel">导出Excel</el-button>
-
-        </el-form-item>
-      </el-form>
-    </div>
-    <div style="background:#fff;padding:15px;margin-top:10px">
-      <el-table :data="sourceList.data" :height="tableHeight" style="width: 100%" v-loading="loading" border id="my-table">
-        <el-table-column prop="groupName" label="组别" width="110" fixed="left" />
-        <el-table-column prop="saleUserName" label="业务员" width="80" fixed="left" />
-
-        <template v-if="dayList && dayList.length>0">
-          <el-table-column v-for="col in dayList" :key="col" :label="col" align="center">
-            <el-table-column prop="address" label="系统" min-width="100" align="right">
-              <template #default="{ row, $index }">
-                <div style="width: 100%" :class="today==col?'isToday':''" v-if="row[col] && row[col].sumContractAmount">
-                  {{moneyFormat(row[col].sumContractAmount,2)}}
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="address" label="聚水潭" min-width="100" align="right">
-              <template #default="{ row, $index }">
-                <div style="width: 100%" :class="today==col?'isToday':''" v-if="row[col] && row[col].sumJstAmount">
-                  {{moneyFormat(row[col].sumJstAmount,2)}}
-                </div>
-              </template>
-            </el-table-column>
-          </el-table-column>
         </template>
-
-        <el-table-column width="95" align="right" fixed="right">
-          <template #header>
-            <div>
-              系统
-              <br>
-              月累计
-            </div>
-          </template>
-          <template #default="{ row, $index }">
-            <div style="width: 100%">
-              {{moneyFormat(row.sumContractAmount,2)}}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column width="95" align="right" fixed="right">
-          <template #header>
-            <div>
-              聚水潭
-              <br>
-              月累计
-            </div>
-          </template>
-          <template #default="{ row, $index }">
-            <div style="width: 100%">
-              {{moneyFormat(row.sumJstAmount,2)}}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column width="95" align="right" fixed="right">
-          <template #header>
-            <div>
-              合计
-              <br>
-              月累计
-            </div>
-          </template>
-          <template #default="{ row, $index }">
-            <div style="width: 100%">
-              {{moneyFormat(row.sumAmount,2)}}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column label="月目标" width="90" align="right" fixed="right">
-          <template #default="{ row, $index }">
-            <div style="width: 100%">
-              {{moneyFormat(row.targetAmount,2)}}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column label="月达成率" width="90" align="right" fixed="right">
-          <template #default="{ row, $index }">
-            <div style="width: 100%">
-              {{moneyFormat(row.finishRate,2)}} %
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column prop="ranking" label="排名" width="60" align="center" fixed="right" />
-      </el-table>
+      </byTable>
     </div>
-
   </div>
 </template>
 
 <script setup>
 import byTable from "@/components/byTable/index";
-import { getMonthBetween } from "@/utils/date.js";
+import byForm from "@/components/byForm/index";
 import moment from "moment";
-import FileSaver from "file-saver";
-import * as XLSX from "xlsx";
-import { nextTick } from "vue";
 const { proxy } = getCurrentInstance();
-const tableHeight = ref(0);
-const getTableHeight = () => {
-  tableHeight.value = window.innerHeight - 150 - 79;
-};
-getTableHeight();
-window.addEventListener("resize", () => {
-  getTableHeight();
-});
-const today = ref(moment().format("yyyy-MM-DD"));
-const beginTime = ref(
-  moment().startOf("month").format("yyyy-MM-DD") + " 00:00:00"
-);
-const endTime = ref(moment().endOf("month").format("YYYY-MM-DD") + " 23:59:59");
-const weekBegin = ref(
-  moment().startOf("week").format("yyyy-MM-DD") + " 00:00:00"
-);
-const weekEnd = ref(moment().endOf("week").format("yyyy-MM-DD") + " 23:59:59");
+const loading = ref(false);
+const submitLoading = ref(false);
 const sourceList = ref({
   data: [],
   pagination: {
+    total: 3,
     pageNum: 1,
     pageSize: 10,
-    beginTime: "",
-    endTime: "",
-    current: "本月",
+    years: new Date().getFullYear() + "",
   },
 });
-const loading = ref(false);
-const getList = (req) => {
+const treeData = ref([]);
+const dialogVisible = ref(false);
+const modalType = ref("add");
+const selectConfig = computed(() => [
+  {
+    type: "time",
+    itemType: "year",
+    label: "年份",
+    placeholder: "请选择",
+    prop: "years",
+    placeholderOne: "结束日期",
+    propOne: "",
+    fn: (val) => {
+      getList();
+    },
+  },
+]);
+const config = ref([
+  {
+    attrs: {
+      label: "公司名称",
+      prop: "companyName",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
+      label: "部门名称",
+      prop: "deptName",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
+      label: "组别",
+      prop: "groupName",
+      width: 160,
+    },
+  },
+]);
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "code",
+      label: "店铺编号",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "店铺名称",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "负责部门",
+      data: treeData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  deptId: [{ required: true, message: "请选择负责部门", trigger: "change" }],
+  name: [{ required: true, message: "请输入店铺名称", trigger: "blur" }],
+  code: [{ required: true, message: "请输入店铺编号", trigger: "blur" }],
+});
+
+const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/deptPerf/monthlyReporting", sourceList.value.pagination)
-    .then((res) => {
-      sourceList.value.data = res;
-      setTimeout(() => {
-        loading.value = false;
-      }, 500);
-    });
+  proxy.post("/deptPerf/list", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
 
-const dayList = ref([]);
-const onQuery = () => {
-  loading.value = true;
-  if (
-    sourceList.value.pagination.beginTime &&
-    sourceList.value.pagination.endTime
-  ) {
-    dayList.value = getMonthBetween(
-      sourceList.value.pagination.beginTime.slice(0, 10),
-      sourceList.value.pagination.endTime.slice(0, 10)
-    );
-    nextTick(() => {
-      setTimeout(() => scrollIntoEle(), 1000);
+const processesData = ref([]);
+const monthData = ref([
+  "1",
+  "2",
+  "3",
+  "4",
+  "5",
+  "6",
+  "7",
+  "8",
+  "9",
+  "10",
+  "11",
+  "12",
+]);
+const attrData = ref([
+  "january",
+  "february",
+  "march",
+  "april",
+  "may",
+  "june",
+  "july",
+  "august",
+  "september",
+  "october",
+  "november",
+  "december",
+]);
+const getProcesses = () => {
+  for (let i = 0; i < monthData.value.length; i++) {
+    const ele = monthData.value[i];
+    let attrs = {
+      label: `${ele}月(万元)`,
+      slot: attrData.value[i],
+      isNeedHeaderSlot: false,
+      "min-width": 100,
+      // fixed: "right",
+    };
+    config.value.push({
+      attrs,
     });
   }
-  getList();
 };
+getProcesses();
+getList();
 
-const changeCurrent = (val) => {
-  switch (val) {
-    case "本日":
-      sourceList.value.pagination.beginTime = today.value + " 00:00:00";
-      sourceList.value.pagination.endTime = today.value + " 23:59:59";
-      break;
-    case "本周":
-      sourceList.value.pagination.beginTime = weekBegin.value;
-      sourceList.value.pagination.endTime = weekEnd.value;
-      break;
-    case "本月":
-      sourceList.value.pagination.beginTime = beginTime.value;
-      sourceList.value.pagination.endTime = endTime.value;
-      break;
+const objectSpanMethod = ({ rowIndex, columnIndex }) => {
+  if (columnIndex === 0) {
+    const _row = flitterData(sourceList.value.data, "companyId").one[rowIndex];
+    const _col = _row > 0 ? 1 : 0;
+    return {
+      rowspan: _row,
+      colspan: _col,
+    };
   }
-  onQuery();
-};
-
-const onReset = () => {
-  sourceList.value.pagination.current = "本月";
-  sourceList.value.pagination.beginTime = beginTime.value;
-  sourceList.value.pagination.endTime = endTime.value;
-  onQuery();
-};
-onReset();
-
-// const nowYearMonth = ref(moment().format("YYYY-MM"));
-const disabledFn = (date) => {
-  if (
-    moment(date).isBefore(beginTime.value) ||
-    moment(date).isAfter(endTime.value)
-  ) {
-    return true;
-  } else {
-    return false;
+  if (columnIndex === 1) {
+    const _row = flitterData(sourceList.value.data, "deptId").one[rowIndex];
+    const _col = _row > 0 ? 1 : 0;
+    return {
+      rowspan: _row,
+      colspan: _col,
+    };
   }
 };
+const flitterData = (arr, att) => {
+  let spanOneArr = [];
+  let concatOne = 0;
+  arr.forEach((item, index) => {
+    if (index === 0) {
+      spanOneArr.push(1);
+    } else {
+      //注意这里的quarterly是表格绑定的字段,根据自己的需求来改
+      if (item[att] === arr[index - 1][att]) {
+        //第一列需合并相同内容的判断条件
+        spanOneArr[concatOne] += 1;
+        spanOneArr.push(0);
+      } else {
+        spanOneArr.push(1);
+        concatOne = index;
+      }
+    }
+  });
+  return {
+    one: spanOneArr,
+  };
+};
 
-const scrollIntoEle = () => {
-  let eles = document.querySelectorAll(".isToday");
-  if (eles && eles[0]) {
-    eles[0].scrollIntoView({
-      // behavior: "smooth",
-      block: "start",
-      inline: "start",
+const handleChangeVal = (item, month, val) => {
+  if (val) {
+    const data = {
+      ...item,
+      id: item.id,
+      deptId: item.deptId,
+      groupId: item.groupId,
+      years: sourceList.value.pagination.years,
+    };
+    data[month] = val;
+    proxy.post("/deptPerf/edit", data).then((res) => {
+      // proxy.msgTip("配置成功");
+      // getList();
     });
   }
 };
 
-const exportExcel = () => {
-  proxy.msgTip("正在导出,请稍后", 2);
-  const wb = XLSX.utils.table_to_book(document.querySelector("#my-table")); // 关联dom节点
-  // 设置百分比列的单元格样式
-  const percentStyle = {
-    font: { bold: true },
-    fill: { fgColor: { rgb: "FFFF00" } },
-    border: { top: { style: "thin" }, bottom: { style: "thin" } },
-  };
-
-  if (wb.Sheets.Sheet1) {
-    // 达成率单元格的key开头
-    let cellKey = "";
-    for (const key in wb.Sheets.Sheet1) {
-      let value = wb.Sheets.Sheet1[key];
-      if (value && value.v == "月达成率") {
-        cellKey = key.match(/[a-zA-Z]+/g)[0];
-      }
-      // key有包含cellKey的
-      if (cellKey && key.includes(cellKey)) {
-        // 单元格的样式
-        wb.Sheets.Sheet1[key].s = percentStyle;
-        // 用于指定单元格中显示值的格式,例如日期格式、百分比格式等
-        wb.Sheets.Sheet1[key].z = "0.00%";
-      }
-    }
-  }
-  const wbout = XLSX.write(wb, {
-    bookType: "xlsx",
-    bookSST: true,
-    type: "array",
-  });
-  try {
-    FileSaver.saveAs(
-      new Blob([wbout], {
-        type: "application/octet-stream",
-      }),
-      "销售报表.xlsx"
-    );
-  } catch (e) {
-    console.log(e, wbout);
+let date = new Date();
+const getIsDisabled = (index) => {
+  let currentMonth = monthData.value[index];
+  let year = sourceList.value.pagination.years;
+  let nowYear = date.getFullYear();
+  let nowMonth = date.getMonth() + 1;
+  if (Number(year) < nowYear) {
+    return true;
+  } else if (Number(year) == nowYear && Number(currentMonth) < nowMonth) {
+    return true;
+  } else {
+    return false;
   }
-  return wbout;
 };
 </script>
 
 <style lang="scss" scoped>
-:deep(
-    .el-table .el-table__header-wrapper th,
-    .el-table .el-table__fixed-header-wrapper th
-  ) {
-  height: auto !important;
-}
-:deep(.el-table th.el-table__cell) {
-  background: #fff !important;
-}
-:deep(.el-table .el-table__cell) {
-  padding: 0 !important;
-}
-:deep(.el-table .cell) {
-  padding: 0 6px !important;
-  font-size: 12px !important;
-}
-.query {
-  background: #20b2aa;
-  color: #fff;
-  border: 1px solid #20b2aa;
-}
-.isToday {
-  // background: red !important;
-  // color: #fff !important;
-  color: #409eff;
-}
-</style>
+</style>

+ 3 - 3
src/views/MES/processScheduling/index.vue

@@ -36,7 +36,7 @@
             </template>
 
             <template #size="{ item }">
-              <div v-if="item.productLength && item.productWidth && item.productHeight">
+              <div>
                 <span>{{ item.productLength }}</span>*
                 <span>{{ item.productWidth }}</span>*
                 <span>{{ item.productHeight }}</span>
@@ -52,7 +52,7 @@
                 <div>
                   名称:{{item.productName}}
                 </div>
-                <div v-if="item.productLength && item.productWidth && item.productHeight">
+                <div>
                   尺寸:<span>{{ item.productLength }}</span>*
                   <span>{{ item.productWidth }}</span>*
                   <span>{{ item.productHeight }}</span>
@@ -192,7 +192,7 @@
           </template>
 
           <template #size="{ item }">
-            <div v-if="item.productLength && item.productWidth && item.productHeight">
+            <div>
               <span>{{ item.productLength }}</span>*
               <span>{{ item.productWidth }}</span>*
               <span>{{ item.productHeight }}</span>

+ 4 - 4
src/views/MES/productionTask/index.vue

@@ -109,12 +109,12 @@
         </template>
 
         <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <div>
             <span>{{ item.productLength }}</span>*
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productHeight }}</span>
           </div>
-          <div v-else></div>
+
         </template>
 
         <template #isOverdue="{item}">
@@ -209,12 +209,12 @@
         </template>
 
         <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <div>
             <span>{{ item.productLength }}</span>*
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productHeight }}</span>
           </div>
-          <div v-else></div>
+
         </template>
 
         <template #isOverdue="{item}">

+ 1 - 1
src/views/MES/productionTask/selectProductionTask.vue

@@ -30,7 +30,7 @@
       </template>
 
       <template #size="{ item }">
-        <div v-if="item.productLength && item.productWidth && item.productHeight">
+        <div>
           <span>{{ item.productLength }}</span>*
           <span>{{ item.productWidth }}</span>*
           <span>{{ item.productHeight }}</span>

+ 1 - 1
src/views/MES/reportDetail/index.vue

@@ -14,7 +14,7 @@
         </template>
 
         <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <div>
             <span>{{ item.productLength }}</span>*
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productHeight }}</span>

+ 3 - 3
src/views/monitor/logininfor/index.vue

@@ -31,13 +31,13 @@
         <el-col :span="1.5">
           <el-button type="danger" plain icon="Delete" @click="handleClean" v-hasPermi="['monitor:logininfor:remove']">清空</el-button>
         </el-col>
-        <el-col :span="1.5">
+        <!-- <el-col :span="1.5">
           <el-button type="primary" plain icon="Unlock" :disabled="single" @click="handleUnlock"
                      v-hasPermi="['monitor:logininfor:unlock']">解锁</el-button>
         </el-col>
         <el-col :span="1.5">
           <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['monitor:logininfor:export']">导出</el-button>
-        </el-col>
+        </el-col> -->
         <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
       <el-table ref="logininforRef" v-loading="loading" :data="logininforList" @selection-change="handleSelectionChange" :default-sort="defaultSort"
@@ -47,7 +47,7 @@
         <el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom"
                          :sort-orders="['descending', 'ascending']" />
         <el-table-column label="地址" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
-        <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
+        <!-- <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" /> -->
         <el-table-column label="操作系统" align="center" prop="os" :show-overflow-tooltip="true" />
         <el-table-column label="浏览器" align="center" prop="browser" :show-overflow-tooltip="true" />
         <el-table-column label="登录状态" align="center" prop="status">

+ 2 - 2
src/views/monitor/operlog/index.vue

@@ -37,9 +37,9 @@
         <el-col :span="1.5">
           <el-button type="danger" plain icon="Delete" @click="handleClean" v-hasPermi="['monitor:operlog:remove']">清空</el-button>
         </el-col>
-        <el-col :span="1.5">
+        <!-- <el-col :span="1.5">
           <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['monitor:operlog:export']">导出</el-button>
-        </el-col>
+        </el-col> -->
         <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
 

+ 54 - 32
src/views/product/material/index.vue

@@ -31,12 +31,12 @@
           </div>
         </template>
         <template #size="{ item }">
-          <div v-if="item['length'] && item.width && item.height">
+          <div>
             <span>{{ item['length'] }}</span>*
             <span>{{ item.width }}</span>*
             <span>{{ item.height }}</span>
           </div>
-          <div v-else></div>
+
         </template>
         <template #price="{ item }">
           <div v-if="item.price">
@@ -72,12 +72,12 @@
           </div>
         </template>
         <template #size="{ item }">
-          <div v-if="item['length'] && item.width && item.height">
+          <div>
             <span>{{ item['length'] }}</span>*
             <span>{{ item.width }}</span>*
             <span>{{ item.height }}</span>
           </div>
-          <div v-else></div>
+
         </template>
         <template #price="{ item }">
           <div v-if="item.price">
@@ -167,12 +167,12 @@
           </template>
 
           <template #size="{ item }">
-            <div v-if="item['length'] && item.width && item.height">
+            <div>
               <span>{{ item['length'] }}</span>*
               <span>{{ item.width }}</span>*
               <span>{{ item.height }}</span>
             </div>
-            <div v-else></div>
+
           </template>
 
         </byTable>
@@ -234,9 +234,9 @@ const rules = ref({
   productClassifyId: [
     { required: true, message: "请选择物料分类", trigger: "change" },
   ],
-  attrRawMaterialId: [
-    { required: true, message: "请选择关联原材料无属性", trigger: "change" },
-  ],
+  // attrRawMaterialId: [
+  //   { required: true, message: "请选择关联原材料无属性", trigger: "change" },
+  // ],
   name: [{ required: true, message: "请输入物料名称", trigger: "blur" }],
   customCode: [{ required: true, message: "请输入物料编码", trigger: "blur" }],
   length: [{ required: true, message: "请输入长 (cm)", trigger: "blur" }],
@@ -320,6 +320,17 @@ const configOne = computed(() => {
           },
           {
             attrs: {
+              label: "复制",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtlOne(row);
+            },
+          },
+          {
+            attrs: {
               label: "删除",
               type: "danger",
               text: true,
@@ -457,17 +468,17 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          // {
-          //   attrs: {
-          //     label: "产品反查",
-          //     type: "primary",
-          //     text: true,
-          //   },
-          //   el: "button",
-          //   click() {
-          //     getAssociationProduct(row);
-          //   },
-          // },
+          {
+            attrs: {
+              label: "产品反查",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getAssociationProduct(row);
+            },
+          },
           {
             attrs: {
               label: "修改",
@@ -479,6 +490,18 @@ const config = computed(() => {
               getDtl(row);
             },
           },
+
+          {
+            attrs: {
+              label: "复制",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtlOne(row);
+            },
+          },
           {
             attrs: {
               label: "删除",
@@ -901,18 +924,17 @@ const getDtl = (row) => {
   });
 };
 
-// const getDtlOne = (row) => {
-//   modalType.value = "add";
-//   proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
-//     fileList.value = [];
-//     fileListCopy.value = [];
-//     res.type = res.type + "";
-//     res.definition = "2";
-//     delete res.id;
-//     formData.data = res;
-//     dialogVisible.value = true;
-//   });
-// };
+const getDtlOne = (row) => {
+  isSpecial.value = false;
+  dialogVisible.value = true;
+  modalType.value = "add";
+  proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    if (formData.data.productClassifyId) {
+      changeProductClassifyId(formData.data.productClassifyId);
+    }
+  });
+};
 
 const handleClickFile = (file) => {
   window.open(file.fileUrl, "_blank");

+ 2 - 2
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -26,12 +26,12 @@
           <div v-else></div>
         </template>
         <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <div>
             <span>{{ item.productLength }}</span>*
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productHeight }}</span>
           </div>
-          <div v-else></div>
+
         </template>
 
         <template #purchaseCount="{item}">

+ 2 - 2
src/views/purchaseManage/purchaseManage/subscribe/index.vue

@@ -17,12 +17,12 @@
           </div>
         </template>
         <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <div>
             <span>{{ item.productLength }}cm</span>*
             <span>{{ item.productWidth }}cm</span>*
             <span>{{ item.productHeight }}cm</span>
           </div>
-          <div v-else></div>
+
         </template>
       </byTable>
     </div>

+ 1 - 1
src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue

@@ -23,7 +23,7 @@
           <div v-else></div>
         </template>
         <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <div>
             <span>{{ item.productLength }}</span>*
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productHeight }}</span>

+ 42 - 2
src/views/report/accountBalance/index.vue

@@ -36,11 +36,23 @@
               </div>
             </template>
           </el-table-column>
+          <el-table-column prop="yearBeginBorrowAmount" label="借方余额" width="105" fixed="left" align="right">
+            <template #default="{ row, $index }">
+              <div style="width: 100%">
+                <el-input-number v-model="row['yearBeginBorrowAmount']" :placeholder="'借方余额'" onmousewheel="return false;" :precision="2"
+                                 :controls="false" :min="0" @change="(val)=>handleChangeVal(row,val)" :disabled="getIsDisabled()" style="width:100%">
+                </el-input-number>
+              </div>
+            </template>
+          </el-table-column>
           <template v-if="monthList && monthList.length>0">
             <el-table-column v-for="col in monthList" :key="col.key" :label="col.label" width="90" align="left">
               <template #default="{ row, $index }">
-                <div style="width: 100%" v-if="row['month'+col.key+'Amount']">
-                  {{moneyFormat(row['month'+col.key+'Amount'],2)}}
+                <div style="width: 100%">
+                  <el-input-number v-model="row['month'+col.key+'Amount']" :placeholder="col.key+'月'" onmousewheel="return false;" :precision="2"
+                                   :controls="false" :min="0" @change="(val)=>handleChangeVal(row,val,col)" :disabled="getIsDisabled()"
+                                   style="width:100%">
+                  </el-input-number>
                 </div>
               </template>
             </el-table-column>
@@ -752,6 +764,34 @@ const changeMoney = (val, month, customerId) => {
     });
   }
 };
+
+const handleChangeVal = (item, val, col) => {
+  if (val) {
+    const data = {
+      ...item,
+      idStr: item.subjectsCalculateItemIds,
+      year: sourceList.value.pagination.year,
+    };
+    if (col) {
+      data["month" + col.key + "Amount"] = val;
+    } else {
+      data.yearBeginBorrowAmount = val;
+    }
+    proxy.post("/calculateItemBalance/editOrSave", data).then((res) => {
+      // proxy.msgTip("配置成功");
+      // getList();
+    });
+  }
+};
+
+let date = new Date();
+const getIsDisabled = (index) => {
+  let nowYear = date.getFullYear();
+  if (nowYear == sourceList.value.pagination.year) {
+    return false;
+  }
+  return true;
+};
 </script>
 
 <style lang="scss" scoped>

+ 2 - 2
src/views/salesMange/afterSales/SelectContractProduct.vue

@@ -19,12 +19,12 @@
         </template>
 
         <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <div>
             <span>{{ item.productLength}}</span>*
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productHeight }}</span>
           </div>
-          <div v-else></div>
+
         </template>
         <template #price="{ item }">
           <div v-if="item.price">

+ 1 - 1
src/views/salesMange/afterSales/index.vue

@@ -31,7 +31,7 @@
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productWidth }}</span>
           </div>
-          <div v-else></div>
+
         </template>
 
       </byTable>