fix 0807docs
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							@@ -78,6 +78,14 @@
 | 
			
		||||
                <span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
 | 
			
		||||
                  {{ opt[col.customLabel] || "无描述" }}
 | 
			
		||||
                </span>
 | 
			
		||||
                <template v-if="col.customLabels">
 | 
			
		||||
                  <span
 | 
			
		||||
                    v-for="(label, idx) in col.customLabels"
 | 
			
		||||
                    :key="Math.random()"
 | 
			
		||||
                    style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
 | 
			
		||||
                    {{ opt[label] || " - " }}
 | 
			
		||||
                  </span>
 | 
			
		||||
                </template>
 | 
			
		||||
              </el-option>
 | 
			
		||||
            </el-select>
 | 
			
		||||
            <el-switch
 | 
			
		||||
@@ -248,34 +256,38 @@ export default {
 | 
			
		||||
    const promiseHistory = {};
 | 
			
		||||
 | 
			
		||||
    const getData = (col, param) => {
 | 
			
		||||
      console.log("getData: ", col.prop, "/", param ?? "no param!");
 | 
			
		||||
      // console.log("getData: ", col.prop, "/", param ?? "no param!");
 | 
			
		||||
      // 获取数据 - 不需要等待前置条件时
 | 
			
		||||
      promiseHistory[col.prop] = col.fetchData(param).then(({ data: res }) => {
 | 
			
		||||
        if (res.code === 0) {
 | 
			
		||||
          if ("list" in res.data) {
 | 
			
		||||
            console.log(
 | 
			
		||||
              "SdASD ",
 | 
			
		||||
              res.data.list.map((i) => ({
 | 
			
		||||
            let options = [];
 | 
			
		||||
            if (col.customLabel) {
 | 
			
		||||
              options = res.data.list.map((i) => ({
 | 
			
		||||
                label: col.optionLabel ? i[col.optionLabel] : i.name,
 | 
			
		||||
                value: col.optionValue ? i[col.optionValue] : i.id,
 | 
			
		||||
                [col.customLabel]: i[col.customLabel],
 | 
			
		||||
              }))
 | 
			
		||||
            );
 | 
			
		||||
              }));
 | 
			
		||||
            } else if (col.customLabels) {
 | 
			
		||||
              options = res.data.list.map((i) => {
 | 
			
		||||
                let extraOptions = {};
 | 
			
		||||
                col.customLabels.forEach((label) => {
 | 
			
		||||
                  extraOptions[label] = i[label];
 | 
			
		||||
                });
 | 
			
		||||
                return {
 | 
			
		||||
                  label: col.optionLabel ? i[col.optionLabel] : i.name,
 | 
			
		||||
                  value: col.optionValue ? i[col.optionValue] : i.id,
 | 
			
		||||
                  ...extraOptions,
 | 
			
		||||
                };
 | 
			
		||||
              });
 | 
			
		||||
            } else {
 | 
			
		||||
              options = res.data.list.map((i) => ({
 | 
			
		||||
                label: col.optionLabel ? i[col.optionLabel] : i.name,
 | 
			
		||||
                value: col.optionValue ? i[col.optionValue] : i.id,
 | 
			
		||||
              }));
 | 
			
		||||
            }
 | 
			
		||||
            // 填充 options
 | 
			
		||||
            this.$set(
 | 
			
		||||
              col,
 | 
			
		||||
              "options",
 | 
			
		||||
              col.customLabel
 | 
			
		||||
                ? res.data.list.map((i) => ({
 | 
			
		||||
                    label: col.optionLabel ? i[col.optionLabel] : i.name,
 | 
			
		||||
                    value: col.optionValue ? i[col.optionValue] : i.id,
 | 
			
		||||
                    [col.customLabel]: i[col.customLabel],
 | 
			
		||||
                  }))
 | 
			
		||||
                : res.data.list.map((i) => ({
 | 
			
		||||
                    label: col.optionLabel ? i[col.optionLabel] : i.name,
 | 
			
		||||
                    value: col.optionValue ? i[col.optionValue] : i.id,
 | 
			
		||||
                  }))
 | 
			
		||||
            );
 | 
			
		||||
            this.$set(col, "options", options);
 | 
			
		||||
 | 
			
		||||
            // 是否需要缓存数据列表
 | 
			
		||||
            if ("injectTo" in col || col.cached) {
 | 
			
		||||
 
 | 
			
		||||
@@ -12,9 +12,9 @@ export default function () {
 | 
			
		||||
    { prop: "name", label: "牌号" },
 | 
			
		||||
    { prop: "syncTime", label: "同步时间", filter: timeFilter },
 | 
			
		||||
    { width: 120, prop: "techCode", label: "烧制曲线", subcomponent: techBox },
 | 
			
		||||
    { prop: "upweight", label: "建议混料上限" },
 | 
			
		||||
    { prop: "downweight", label: "建议混料下限" },
 | 
			
		||||
    // { prop: "externalCode", label: "版本号" },
 | 
			
		||||
    { width: 110, prop: "upweight", label: "建议混料上限" },
 | 
			
		||||
    { width: 110, prop: "downweight", label: "建议混料下限" },
 | 
			
		||||
    { prop: "shortDesc", label: "喷码描述" },
 | 
			
		||||
    // { prop: "specifications", label: "程序号" },
 | 
			
		||||
    // { prop: "unitDictValue", label: "砖型", filter: dictFilter("unit") },
 | 
			
		||||
    // { prop: "unitDictValue", label: "物料号", filter: dictFilter("unit") },
 | 
			
		||||
@@ -256,7 +256,7 @@ export default function () {
 | 
			
		||||
      rows: [
 | 
			
		||||
        [
 | 
			
		||||
          {
 | 
			
		||||
            input: true,
 | 
			
		||||
            forceDisabled: true,
 | 
			
		||||
            label: "配方号",
 | 
			
		||||
            prop: "code",
 | 
			
		||||
            rules: { required: true, message: "必填项不能为空", trigger: "blur" },
 | 
			
		||||
@@ -264,7 +264,7 @@ export default function () {
 | 
			
		||||
            elparams: { disabled: true },
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            input: true,
 | 
			
		||||
            forceDisabled: true,
 | 
			
		||||
            label: "牌号",
 | 
			
		||||
            prop: "name",
 | 
			
		||||
            rules: { required: true, message: "必填项不能为空", trigger: "blur" },
 | 
			
		||||
@@ -286,7 +286,17 @@ export default function () {
 | 
			
		||||
            rules: [{ type: "number", trigger: "blur", message: "请输入数字类型", transform: (val) => Number(val) }],
 | 
			
		||||
            elparams: { placeholder: "请输入建议混料上限" },
 | 
			
		||||
          },
 | 
			
		||||
        ]
 | 
			
		||||
        ],
 | 
			
		||||
        [
 | 
			
		||||
          {
 | 
			
		||||
            input: true,
 | 
			
		||||
            label: "喷码描述",
 | 
			
		||||
            prop: "shortDesc",
 | 
			
		||||
            // rules: { required: true, message: "必填项不能为空", trigger: "blur" },
 | 
			
		||||
            // elparams: { disabled: true },
 | 
			
		||||
          },
 | 
			
		||||
          null
 | 
			
		||||
        ],
 | 
			
		||||
      ],
 | 
			
		||||
      operations: [
 | 
			
		||||
        { name: "add-bom", label: "保存", type: "primary", permission: "", showOnEdit: false },
 | 
			
		||||
 
 | 
			
		||||
@@ -37,8 +37,8 @@ export default function () {
 | 
			
		||||
    { prop: "name", label: "牌号" },
 | 
			
		||||
    { prop: "version", label: "版本" },
 | 
			
		||||
    { prop: "sumqty", label: "总重量" },
 | 
			
		||||
    { prop: "description", label: "物料销售文本" },
 | 
			
		||||
    { width: 150, prop: "shortDesc", label: "物料销售文本短描述" },
 | 
			
		||||
    // { prop: "description", label: "物料销售文本" },
 | 
			
		||||
    // { width: 150, prop: "shortDesc", label: "物料销售文本短描述" },
 | 
			
		||||
    { prop: "remark", label: "备注" },
 | 
			
		||||
    { prop: "createTime", label: "添加时间", filter: timeFilter },
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -60,6 +60,7 @@ export default function () {
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  const now = new Date().getTime();
 | 
			
		||||
  const headFormFields = [
 | 
			
		||||
    {
 | 
			
		||||
      prop: "material",
 | 
			
		||||
@@ -95,6 +96,7 @@ export default function () {
 | 
			
		||||
        "start-placeholder": "开始时间",
 | 
			
		||||
        "end-placeholder": "结束时间",
 | 
			
		||||
      },
 | 
			
		||||
      default: { value: [now - 3600 * 24 * 7 * 1000, now] },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      button: {
 | 
			
		||||
 
 | 
			
		||||
@@ -60,6 +60,7 @@ export default function () {
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  const now = new Date().getTime();
 | 
			
		||||
  const headFormFields = [
 | 
			
		||||
    {
 | 
			
		||||
      prop: "material",
 | 
			
		||||
@@ -95,6 +96,7 @@ export default function () {
 | 
			
		||||
        "start-placeholder": "开始时间",
 | 
			
		||||
        "end-placeholder": "结束时间",
 | 
			
		||||
      },
 | 
			
		||||
      default: { value: [now - 3600 * 24 * 7 * 1000, now] },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      button: {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
 | 
			
		||||
import StateSelect from '@/components/StateSelect.vue';
 | 
			
		||||
import StateSelect from "@/components/StateSelect.vue";
 | 
			
		||||
import request from "@/utils/request";
 | 
			
		||||
import { timeFilter } from '@/utils/filters'
 | 
			
		||||
import { timeFilter } from "@/utils/filters";
 | 
			
		||||
 | 
			
		||||
export default function () {
 | 
			
		||||
  const tableProps = [
 | 
			
		||||
@@ -21,31 +21,32 @@ export default function () {
 | 
			
		||||
      width: 180,
 | 
			
		||||
      subcomponent: TableOperaionComponent,
 | 
			
		||||
      options: [
 | 
			
		||||
        { name: "temperature", label: "烧制温度", },
 | 
			
		||||
        { name: "to-car-payload", label: "装载详情", icon: 'document' },
 | 
			
		||||
        { name: "delete", label: "删除", icon: 'delete', emitFull: true, promptField: 'code' }
 | 
			
		||||
        { name: "temperature", label: "烧制温度" },
 | 
			
		||||
        { name: "to-car-payload", label: "装载详情", icon: "document" },
 | 
			
		||||
        { name: "delete", label: "删除", icon: "delete", emitFull: true, promptField: "code" },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  const now = new Date().getTime();
 | 
			
		||||
  const headFormFields = [
 | 
			
		||||
    {
 | 
			
		||||
      input: true,
 | 
			
		||||
      prop: 'code',
 | 
			
		||||
      prop: "code",
 | 
			
		||||
      label: "窑车号",
 | 
			
		||||
      default: { value: "" },
 | 
			
		||||
      bind: {
 | 
			
		||||
        placeholder: '请输入窑车号'
 | 
			
		||||
      }
 | 
			
		||||
        placeholder: "请输入窑车号",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      input: true,
 | 
			
		||||
      prop: 'orderCode',
 | 
			
		||||
      prop: "orderCode",
 | 
			
		||||
      label: "订单号",
 | 
			
		||||
      default: { value: "" },
 | 
			
		||||
      bind: {
 | 
			
		||||
        placeholder: '请输入订单号'
 | 
			
		||||
      }
 | 
			
		||||
        placeholder: "请输入订单号",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      timerange: true,
 | 
			
		||||
@@ -57,6 +58,7 @@ export default function () {
 | 
			
		||||
        "start-placeholder": "开始时间",
 | 
			
		||||
        "end-placeholder": "结束时间",
 | 
			
		||||
      },
 | 
			
		||||
      default: { value: [now - 3600 * 24 * 7 * 1000, now] },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      button: {
 | 
			
		||||
@@ -79,7 +81,7 @@ export default function () {
 | 
			
		||||
  const dialogJustFormConfigs = null;
 | 
			
		||||
 | 
			
		||||
  const carPayloadDialogConfigs = {
 | 
			
		||||
    dialogWidth: '70%',
 | 
			
		||||
    dialogWidth: "70%",
 | 
			
		||||
    carPayloadDialog: true,
 | 
			
		||||
    clickModalToClose: false,
 | 
			
		||||
    tableConfig: {
 | 
			
		||||
@@ -102,7 +104,6 @@ export default function () {
 | 
			
		||||
    },
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  return {
 | 
			
		||||
    carPayloadDialogConfigs,
 | 
			
		||||
    dialogConfigs: dialogJustFormConfigs,
 | 
			
		||||
@@ -117,7 +118,7 @@ export default function () {
 | 
			
		||||
    urls: {
 | 
			
		||||
      base: "/pms/carHandle",
 | 
			
		||||
      page: "/pms/carHandle/pageHis",
 | 
			
		||||
      pageIsPostApi: true
 | 
			
		||||
      pageIsPostApi: true,
 | 
			
		||||
      // subase: '/pms/blenderStepParam',
 | 
			
		||||
      // subpage: '/pms/blenderStepParam/page',
 | 
			
		||||
      // more...
 | 
			
		||||
 
 | 
			
		||||
@@ -266,7 +266,7 @@
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
            <!-- <el-form-item
 | 
			
		||||
              label="烧成温度"
 | 
			
		||||
              prop="sapParam6"
 | 
			
		||||
              :rules="[
 | 
			
		||||
@@ -282,10 +282,10 @@
 | 
			
		||||
                v-model="dataForm.sapParam6"
 | 
			
		||||
                :disabled="mode.includes('detail')"
 | 
			
		||||
                v-bind="{ placeholder: '输入烧成温度' }"></el-input>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            </el-form-item> -->
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
            <!-- <el-form-item
 | 
			
		||||
              label="烧成时间 H"
 | 
			
		||||
              prop="sapParam7"
 | 
			
		||||
              :rules="[
 | 
			
		||||
@@ -301,7 +301,7 @@
 | 
			
		||||
                v-model="dataForm.sapParam7"
 | 
			
		||||
                :disabled="mode.includes('detail')"
 | 
			
		||||
                v-bind="{ placeholder: '输入烧成时间' }"></el-input>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            </el-form-item> -->
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </InputsArea>
 | 
			
		||||
@@ -377,8 +377,8 @@
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="销售订单号"
 | 
			
		||||
              prop="saleNo"
 | 
			
		||||
              :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
 | 
			
		||||
              prop="saleNo">
 | 
			
		||||
              <!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
 | 
			
		||||
              <el-input
 | 
			
		||||
                v-model="dataForm.saleNo"
 | 
			
		||||
                :disabled="mode.includes('detail')"
 | 
			
		||||
@@ -398,7 +398,7 @@
 | 
			
		||||
              label="销售订单砖数"
 | 
			
		||||
              prop="soqty"
 | 
			
		||||
              :rules="[
 | 
			
		||||
                { required: true, message: '必填项不能为空', trigger: 'blur' },
 | 
			
		||||
                // { required: true, message: '必填项不能为空', trigger: 'blur' },
 | 
			
		||||
                {
 | 
			
		||||
                  type: 'number',
 | 
			
		||||
                  message: '输入正确的数字类型',
 | 
			
		||||
@@ -415,8 +415,8 @@
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="销售时间"
 | 
			
		||||
              prop="deliveryTime"
 | 
			
		||||
              :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
 | 
			
		||||
              prop="deliveryTime">
 | 
			
		||||
              <!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
 | 
			
		||||
              <el-date-picker
 | 
			
		||||
                v-model="dataForm.deliveryTime"
 | 
			
		||||
                :disabled="mode.includes('detail')"
 | 
			
		||||
@@ -452,7 +452,7 @@
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item label="物料号销售文本" prop="shortDesc" :rules="null">
 | 
			
		||||
            <el-form-item label="喷码描述" prop="shortDesc" :rules="null">
 | 
			
		||||
              <span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ export default function () {
 | 
			
		||||
    { width: 60, prop: "cate", label: "子号" },
 | 
			
		||||
    { width: 100, prop: "productCode", label: "物料" },
 | 
			
		||||
    { width: 100, prop: "shapeCode", label: "砖型" },
 | 
			
		||||
    { width: 120, prop: "brand", label: "牌号" },
 | 
			
		||||
    { width: 160, prop: "brand", label: "牌号" },
 | 
			
		||||
    { width: 100, prop: "bomCode", label: "配方编码" },
 | 
			
		||||
    { width: 60, prop: "ai", label: "版本" },
 | 
			
		||||
    { width: 60, prop: "prodqty", label: "数量" },
 | 
			
		||||
@@ -34,7 +34,7 @@ export default function () {
 | 
			
		||||
    { width: 120, prop: "soqty", label: "销售订单数" },
 | 
			
		||||
    { width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter },
 | 
			
		||||
    { width: 65, prop: "sapParam1", label: "addon" },
 | 
			
		||||
    { width: 200, prop: "shortDesc", label: "物料号销售文本" },
 | 
			
		||||
    { width: 200, prop: "shortDesc", label: "喷码描述" },
 | 
			
		||||
    { width: 120, prop: "yieldqty", label: "已生产数量" },
 | 
			
		||||
    { width: 120, prop: "remark", label: "备注" },
 | 
			
		||||
    // { width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@ import { timeFilter } from "@/utils/filters";
 | 
			
		||||
export default function () {
 | 
			
		||||
  const tableProps = [
 | 
			
		||||
    { type: "index", label: "序号" },
 | 
			
		||||
    { prop: "name", label: "名称" },
 | 
			
		||||
    { prop: "code", label: "编码" },
 | 
			
		||||
    // { prop: "enName", label: "英文名称" },
 | 
			
		||||
    // { prop: "enAb", label: "缩写" },
 | 
			
		||||
    { prop: "description", label: "描述" },
 | 
			
		||||
    { prop: "name", label: "名称" },
 | 
			
		||||
    { prop: "remark", label: "备注" },
 | 
			
		||||
    { prop: "createTime", label: "添加时间", filter: timeFilter },
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -7,20 +7,21 @@ import { timeFilter } from "@/utils/filters";
 | 
			
		||||
export default function () {
 | 
			
		||||
  const tableProps = [
 | 
			
		||||
    { type: "index", label: "序号" },
 | 
			
		||||
    { prop: "name", label: "料仓名称" },
 | 
			
		||||
    { prop: "code", label: "料仓编码" },
 | 
			
		||||
    { prop: "typeDictValue", label: "料仓类型", filter: dictFilter("liaocang") },
 | 
			
		||||
    { width: 90, prop: "name", label: "料仓名称" },
 | 
			
		||||
    { width: 90, prop: "code", label: "料仓编码" },
 | 
			
		||||
    { width: 90, prop: "typeDictValue", label: "料仓类型", filter: dictFilter("liaocang") },
 | 
			
		||||
    // { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
 | 
			
		||||
    { prop: "materialDescription", label: "原料" },
 | 
			
		||||
    { prop: "qty", label: "料位" },
 | 
			
		||||
    { width: 220, prop: "materialDescription", label: "原料" },
 | 
			
		||||
    { prop: "qty", label: "料位[kg]" },
 | 
			
		||||
    // { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') },
 | 
			
		||||
    { prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter("material_category") },
 | 
			
		||||
    { prop: "density", label: "原料堆积密度" },
 | 
			
		||||
    { prop: "dosLow", label: "加料下限" },
 | 
			
		||||
    { prop: "dosHigh", label: "加料上限" },
 | 
			
		||||
    { prop: "description", label: "描述" },
 | 
			
		||||
    { width: 128, prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter("material_category") },
 | 
			
		||||
    { width: 128, prop: "density", label: "原料堆积密度" },
 | 
			
		||||
    { width: 90, prop: "dosLow", label: "加料下限" },
 | 
			
		||||
    { width: 90, prop: "dosHigh", label: "加料上限" },
 | 
			
		||||
    { width: 128, prop: "description", label: "描述" },
 | 
			
		||||
    { width: 128, prop: "materialName", label: "中文描述" },
 | 
			
		||||
    // { prop: "remark", label: "备注" },
 | 
			
		||||
    { prop: "createTime", label: "添加时间", filter: timeFilter },
 | 
			
		||||
    { width: 128, prop: "createTime", label: "添加时间", filter: timeFilter },
 | 
			
		||||
    {
 | 
			
		||||
      prop: "operations",
 | 
			
		||||
      name: "操作",
 | 
			
		||||
@@ -123,7 +124,8 @@ export default function () {
 | 
			
		||||
            fetchData: () => this.$http.get("/pms/material/page", { params: { key: "", limit: 999, page: 1 } }),
 | 
			
		||||
            options: [],
 | 
			
		||||
            optionLabel: "code",
 | 
			
		||||
            customLabel: "description",
 | 
			
		||||
            // customLabel: "description+name",
 | 
			
		||||
            customLabels: ["description", "name"],
 | 
			
		||||
            rules: { required: true, message: "必填项不能为空", trigger: "change" },
 | 
			
		||||
            elparams: { filterable: true, placeholder: "请选择原料" },
 | 
			
		||||
          },
 | 
			
		||||
 
 | 
			
		||||
@@ -56,10 +56,7 @@
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="计划开始时间"
 | 
			
		||||
              prop="planStartTime"
 | 
			
		||||
              :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
 | 
			
		||||
            <el-form-item label="计划开始时间" prop="planStartTime">
 | 
			
		||||
              <el-date-picker
 | 
			
		||||
                v-model="dataForm.planStartTime"
 | 
			
		||||
                v-bind="{
 | 
			
		||||
@@ -282,7 +279,7 @@
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
            <!-- <el-form-item
 | 
			
		||||
              label="烧成温度"
 | 
			
		||||
              prop="sapParam6"
 | 
			
		||||
              :rules="[
 | 
			
		||||
@@ -298,10 +295,10 @@
 | 
			
		||||
                v-model="dataForm.sapParam6"
 | 
			
		||||
                :disabled="mode.includes('detail')"
 | 
			
		||||
                v-bind="{ placeholder: '输入烧成温度' }"></el-input>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            </el-form-item> -->
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
            <!-- <el-form-item
 | 
			
		||||
              label="烧成时间 H"
 | 
			
		||||
              prop="sapParam7"
 | 
			
		||||
              :rules="[
 | 
			
		||||
@@ -317,7 +314,7 @@
 | 
			
		||||
                v-model="dataForm.sapParam7"
 | 
			
		||||
                :disabled="mode.includes('detail')"
 | 
			
		||||
                v-bind="{ placeholder: '输入烧成时间' }"></el-input>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            </el-form-item> -->
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </InputsArea>
 | 
			
		||||
@@ -393,8 +390,8 @@
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="销售订单号"
 | 
			
		||||
              prop="saleNo"
 | 
			
		||||
              :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
 | 
			
		||||
              prop="saleNo">
 | 
			
		||||
              <!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
 | 
			
		||||
              <el-input
 | 
			
		||||
                v-model="dataForm.saleNo"
 | 
			
		||||
                :disabled="mode.includes('detail')"
 | 
			
		||||
@@ -414,7 +411,7 @@
 | 
			
		||||
              label="销售订单砖数"
 | 
			
		||||
              prop="soqty"
 | 
			
		||||
              :rules="[
 | 
			
		||||
                { required: true, message: '必填项不能为空', trigger: 'blur' },
 | 
			
		||||
                // { required: true, message: '必填项不能为空', trigger: 'blur' },
 | 
			
		||||
                {
 | 
			
		||||
                  type: 'number',
 | 
			
		||||
                  message: '输入正确的数字类型',
 | 
			
		||||
@@ -431,8 +428,8 @@
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="销售时间"
 | 
			
		||||
              prop="deliveryTime"
 | 
			
		||||
              :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
 | 
			
		||||
              prop="deliveryTime">
 | 
			
		||||
              <!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
 | 
			
		||||
              <el-date-picker
 | 
			
		||||
                v-model="dataForm.deliveryTime"
 | 
			
		||||
                :disabled="mode.includes('detail')"
 | 
			
		||||
@@ -468,12 +465,15 @@
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item label="物料号销售文本" prop="shortDesc" :rules="null">
 | 
			
		||||
            <el-form-item label="喷码描述" prop="shortDesc" :rules="null">
 | 
			
		||||
              <span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item label="托盘类型" prop="palletType">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="托盘类型"
 | 
			
		||||
              prop="palletType"
 | 
			
		||||
              :rules="[{ required: true, message: '请选择托盘类型', trigger: 'blur' }]">
 | 
			
		||||
              <el-select
 | 
			
		||||
                v-model="dataForm.palletType"
 | 
			
		||||
                filterable
 | 
			
		||||
@@ -486,7 +486,10 @@
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item label="贴纸板" prop="paperboard">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="贴纸板"
 | 
			
		||||
              prop="paperboard"
 | 
			
		||||
              :rules="[{ required: true, message: '请选择贴纸板', trigger: 'blur' }]">
 | 
			
		||||
              <el-select
 | 
			
		||||
                v-model="dataForm.paperboard"
 | 
			
		||||
                filterable
 | 
			
		||||
@@ -616,12 +619,12 @@ export default {
 | 
			
		||||
          label: "code",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          url: "/pms/bom/page",
 | 
			
		||||
          url: "/pms/bom/pageById",
 | 
			
		||||
          params: {
 | 
			
		||||
            limit: 999,
 | 
			
		||||
            page: 1,
 | 
			
		||||
            key: "",
 | 
			
		||||
            externalCode: "",
 | 
			
		||||
            id: "", // 编辑时传 bomId
 | 
			
		||||
          },
 | 
			
		||||
          method: "get",
 | 
			
		||||
          target: "bomOptions",
 | 
			
		||||
@@ -805,6 +808,8 @@ export default {
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res && res.code === 0) {
 | 
			
		||||
                this.dataForm = __pick(res.data, Object.keys(this.dataForm));
 | 
			
		||||
 | 
			
		||||
                return res.data.bomId; // 特殊需求:编辑页面,还要根据 bomId 来更新配方号
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: `${res.code}: ${res.msg}`,
 | 
			
		||||
@@ -812,6 +817,28 @@ export default {
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                });
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
            .then((bomId) => {
 | 
			
		||||
              return this.$http({
 | 
			
		||||
                url: "/pms/bom/pageById",
 | 
			
		||||
                method: "get",
 | 
			
		||||
                params: {
 | 
			
		||||
                  limit: 999,
 | 
			
		||||
                  page: 1,
 | 
			
		||||
                  key: "",
 | 
			
		||||
                  id: bomId,
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code == 0) {
 | 
			
		||||
                this.bomOptions = res.data.list.map((item) => ({
 | 
			
		||||
                  name: item.name,
 | 
			
		||||
                  label: item.code,
 | 
			
		||||
                  value: item.id,
 | 
			
		||||
                }));
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
              this.formLoading = false;
 | 
			
		||||
            })
 | 
			
		||||
            .catch((err) => {
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@ export default function () {
 | 
			
		||||
    { width: 60, prop: "cate", label: "子号" },
 | 
			
		||||
    { width: 100, prop: "productCode", label: "物料" }, // "物料编号" }, // select, filterable
 | 
			
		||||
    { width: 100, prop: "shapeCode", label: "砖型" }, // "砖型编号" }, // select, filterable
 | 
			
		||||
    { width: 120, prop: "brand", label: "牌号" }, // select, filterable
 | 
			
		||||
    { width: 160, prop: "brand", label: "牌号" }, // select, filterable
 | 
			
		||||
    { width: 100, prop: "bomCode", label: "配方编码" },
 | 
			
		||||
    { width: 60, prop: "ai", label: "版本" }, // "版本号" }, // auto display according to the 配方
 | 
			
		||||
    { width: 60, prop: "prodqty", label: "数量" }, // "订单砖数" },
 | 
			
		||||
@@ -87,7 +87,7 @@ export default function () {
 | 
			
		||||
    { width: 120, prop: "soqty", label: "销售订单数" },
 | 
			
		||||
    { width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter },
 | 
			
		||||
    { width: 65, prop: "sapParam1", label: "addon" },
 | 
			
		||||
    { width: 200, prop: "shortDesc", label: "物料号销售文本" },
 | 
			
		||||
    { width: 200, prop: "shortDesc", label: "喷码描述" },
 | 
			
		||||
    { width: 120, prop: "yieldqty", label: "已生产数量" }, // uneditable
 | 
			
		||||
    // { prop: "description", label: "详情", subcomponent: TableTextComponent },
 | 
			
		||||
    { width: 120, prop: "remark", label: "备注" },
 | 
			
		||||
 
 | 
			
		||||
@@ -14,8 +14,8 @@ export default function () {
 | 
			
		||||
    { prop: "line", label: "中心线颜色", filter: dictFilter("line") },
 | 
			
		||||
    { prop: "tequipmentTechCode1", label: "压制工艺", subcomponent: techBox },
 | 
			
		||||
    { prop: "tequipmentTechCode2", label: "检测工艺", subcomponent: techBox },
 | 
			
		||||
    { prop: "description", label: "长描述" },
 | 
			
		||||
    { prop: "shortDesc", label: "短描述" },
 | 
			
		||||
    // { prop: "description", label: "长描述" },
 | 
			
		||||
    { prop: "shortDesc", label: "喷码描述" },
 | 
			
		||||
    { prop: "remark", label: "备注" },
 | 
			
		||||
    {
 | 
			
		||||
      prop: "toggle-attachment-dialog",
 | 
			
		||||
 
 | 
			
		||||
@@ -132,8 +132,8 @@ export default {
 | 
			
		||||
      baseImg: require("../../assets/img/login-back.png"),
 | 
			
		||||
      coverImgUrl: "",
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        username: "admin",
 | 
			
		||||
        password: "admin",
 | 
			
		||||
        username: "",
 | 
			
		||||
        password: "",
 | 
			
		||||
        uuid: "string",
 | 
			
		||||
        captcha: "",
 | 
			
		||||
      },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user