update docs_0811
This commit is contained in:
		@@ -3,9 +3,9 @@
 | 
			
		||||
  <div class="base-list-table w-full">
 | 
			
		||||
    <el-table
 | 
			
		||||
      :data="tableData"
 | 
			
		||||
      :cell-style="{ padding: 0 }"
 | 
			
		||||
      v-bind="tableConfig"
 | 
			
		||||
      ref="base-list-table"
 | 
			
		||||
      :cell-style="{ padding: 0 }"
 | 
			
		||||
      :header-cell-style="/** 重写表格样式 **/ {
 | 
			
		||||
        padding: '5px 0',
 | 
			
		||||
      }"
 | 
			
		||||
 
 | 
			
		||||
@@ -472,8 +472,8 @@
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="托盘类型"
 | 
			
		||||
              prop="palletType"
 | 
			
		||||
              :rules="[{ required: true, message: '请选择托盘类型', trigger: 'blur' }]">
 | 
			
		||||
              prop="palletType">
 | 
			
		||||
              <!-- :rules="[{ required: true, message: '请选择托盘类型', trigger: 'blur' }]"> -->
 | 
			
		||||
              <el-select
 | 
			
		||||
                v-model="dataForm.palletType"
 | 
			
		||||
                filterable
 | 
			
		||||
 
 | 
			
		||||
@@ -8,10 +8,7 @@
 | 
			
		||||
          :extra-query-fields="{ code: order.code, cate: order.cate }"
 | 
			
		||||
          :urls="{ page: '/pms/blenderOrder/pageView', detach: '/pms/trans/blenderDeli' }"
 | 
			
		||||
          :page-is-post="true"
 | 
			
		||||
          :table-config="{
 | 
			
		||||
            table: null,
 | 
			
		||||
            column: blenderTableProps,
 | 
			
		||||
          }" />
 | 
			
		||||
          :table-config="{ table: { 'cell-class-name': processCellStyles }, column: blenderTableProps }" />
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col style="margin-bottom: 12px">
 | 
			
		||||
        <!-- 压制订单  -->
 | 
			
		||||
@@ -21,7 +18,7 @@
 | 
			
		||||
          :urls="{ page: '/pms/pressOrder/pageView', detach: '/pms/trans/pressDeli' }"
 | 
			
		||||
          :page-is-post="true"
 | 
			
		||||
          :table-config="{
 | 
			
		||||
            table: null,
 | 
			
		||||
            table: { 'cell-class-name': processCellStyles },
 | 
			
		||||
            column: pressTableProps,
 | 
			
		||||
          }" />
 | 
			
		||||
      </el-col>
 | 
			
		||||
@@ -36,7 +33,7 @@
 | 
			
		||||
          :urls="{ page: '/pms/kilnOrder/pageView' }"
 | 
			
		||||
          :page-is-post="true"
 | 
			
		||||
          :table-config="{
 | 
			
		||||
            table: null,
 | 
			
		||||
            table: { 'cell-class-name': processCellStyles2 },
 | 
			
		||||
            column: kilnTableProps,
 | 
			
		||||
          }" />
 | 
			
		||||
      </el-col>
 | 
			
		||||
@@ -48,7 +45,7 @@
 | 
			
		||||
          :urls="{ page: '/pms/qualityPackOrder/pageView' }"
 | 
			
		||||
          :page-is-post="true"
 | 
			
		||||
          :table-config="{
 | 
			
		||||
            table: null,
 | 
			
		||||
            table: { 'cell-class-name': processCellStyles2 },
 | 
			
		||||
            column: detectionTableProps,
 | 
			
		||||
          }" />
 | 
			
		||||
      </el-col>
 | 
			
		||||
@@ -106,9 +103,15 @@ export default {
 | 
			
		||||
      // 混料
 | 
			
		||||
      blenderTableProps: [
 | 
			
		||||
        { width: 200, prop: "code", label: "混料订单号" },
 | 
			
		||||
        { width: 350, prop: "percent", label: "进度", className: "no-padding-class", subcomponent: percentComponent }, // filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
 | 
			
		||||
        // { width: 350, prop: "percent", label: "进度", className: "no-padding-class", subcomponent: percentComponent }, // filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
 | 
			
		||||
        {
 | 
			
		||||
          width: 575,
 | 
			
		||||
          width: 350,
 | 
			
		||||
          prop: "percent",
 | 
			
		||||
          label: "进度",
 | 
			
		||||
          filter: (val) => (val !== null && val !== undefined ? val + " %" : "-"),
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          width: 200,
 | 
			
		||||
          prop: "statusDictValue",
 | 
			
		||||
          label: "订单状态",
 | 
			
		||||
          filter: (val) =>
 | 
			
		||||
@@ -147,10 +150,13 @@ export default {
 | 
			
		||||
          filter: (val) => (val !== null && val !== undefined ? val + " %" : "-"),
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          width: 200,
 | 
			
		||||
          prop: "statusDictValue",
 | 
			
		||||
          label: "订单状态",
 | 
			
		||||
          filter: (val) =>
 | 
			
		||||
            val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"][val] : "-",
 | 
			
		||||
            val !== null && val !== undefined
 | 
			
		||||
              ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"][val]
 | 
			
		||||
              : "-",
 | 
			
		||||
        },
 | 
			
		||||
        { prop: "qty", label: "生产量" },
 | 
			
		||||
        { prop: "qtyComplete", label: "完成量" },
 | 
			
		||||
@@ -199,16 +205,54 @@ export default {
 | 
			
		||||
  created() {},
 | 
			
		||||
  mounted() {},
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(/** 参数 */) {
 | 
			
		||||
      // Promise.all(
 | 
			
		||||
      // 获取混料订单
 | 
			
		||||
      // 获取压制订单
 | 
			
		||||
      // 获取窑炉订单
 | 
			
		||||
      // 获取检测包装订单
 | 
			
		||||
      // )
 | 
			
		||||
    /** 设置混料、压制订单单元格的样式规则 */
 | 
			
		||||
    processCellStyles({ row, column, rowIndex, columnIndex }) {
 | 
			
		||||
      if (columnIndex != 1 && columnIndex != 2) return;
 | 
			
		||||
      if (columnIndex == 1) {
 | 
			
		||||
        let { percent } = row;
 | 
			
		||||
        percent = percent ?? +percent;
 | 
			
		||||
        // 如果订单进度大于或等于100%,显示黄色
 | 
			
		||||
        if (percent >= 100) return "bg-yellow";
 | 
			
		||||
        // 如果订单进度小于100%,显示绿色
 | 
			
		||||
        else if (percent < 100) return "bg-light-green";
 | 
			
		||||
        return "bg-light-red";
 | 
			
		||||
      }
 | 
			
		||||
      if (columnIndex == 2) {
 | 
			
		||||
        let { statusDictValue } = row;
 | 
			
		||||
        if (statusDictValue == "2") {
 | 
			
		||||
          // 如果订单状态为'生产'
 | 
			
		||||
          return "bg-light-green";
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    /** 设置烧成、检测包装单元格的样式规则 */
 | 
			
		||||
    processCellStyles2({ row, column, rowIndex, columnIndex }) {
 | 
			
		||||
      if (columnIndex != 1) return;
 | 
			
		||||
      let { percent } = row;
 | 
			
		||||
      percent = percent ?? +percent;
 | 
			
		||||
      // 如果订单进度大于或等于100%,显示黄色
 | 
			
		||||
      if (percent >= 100) return "bg-yellow";
 | 
			
		||||
      // 如果订单进度小于100%,显示绿色
 | 
			
		||||
      else if (percent < 100) return "bg-light-green";
 | 
			
		||||
      return "bg-light-red";
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped></style>
 | 
			
		||||
<style scoped>
 | 
			
		||||
.suborder-detail >>> .bg-yellow {
 | 
			
		||||
  background: yellow !important;
 | 
			
		||||
  padding: 4px !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.suborder-detail >>> .bg-light-green {
 | 
			
		||||
  background: lightgreen;
 | 
			
		||||
  padding: 4px !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.suborder-detail >>> .bg-light-red {
 | 
			
		||||
  /* background: lightcoral; */
 | 
			
		||||
  padding: 4px !important;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user