|
@@ -77,7 +77,9 @@
|
|
|
<view class="label">受托工厂:</view>
|
|
<view class="label">受托工厂:</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
<u-col span="8">
|
|
<u-col span="8">
|
|
|
- <view class="value">{{ form.beEntrustedFactoriesName || "—" }}</view>
|
|
|
|
|
|
|
+ <view class="value">{{
|
|
|
|
|
+ form.beEntrustedFactoriesName || "—"
|
|
|
|
|
+ }}</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
</u-row>
|
|
</u-row>
|
|
|
<u-row>
|
|
<u-row>
|
|
@@ -145,7 +147,9 @@
|
|
|
<view class="label">请托数量:</view>
|
|
<view class="label">请托数量:</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
<u-col span="8">
|
|
<u-col span="8">
|
|
|
- <view class="value">{{ row.totalCount || "—" }}{{ row.measuringUnit || "" }}</view>
|
|
|
|
|
|
|
+ <view class="value"
|
|
|
|
|
+ >{{ row.totalCount || "—" }}{{ row.measuringUnit || "" }}</view
|
|
|
|
|
+ >
|
|
|
</u-col>
|
|
</u-col>
|
|
|
</u-row>
|
|
</u-row>
|
|
|
<u-row>
|
|
<u-row>
|
|
@@ -153,7 +157,9 @@
|
|
|
<view class="label">计划类型:</view>
|
|
<view class="label">计划类型:</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
<u-col span="8">
|
|
<u-col span="8">
|
|
|
- <view class="value">{{ getPlanTypeLabel(row.planType) || "—" }}</view>
|
|
|
|
|
|
|
+ <view class="value">{{
|
|
|
|
|
+ getPlanTypeLabel(row.planType) || "—"
|
|
|
|
|
+ }}</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
</u-row>
|
|
</u-row>
|
|
|
<u-row>
|
|
<u-row>
|
|
@@ -274,7 +280,12 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { pleaseEntrustDetail, getProduceTaskList } from "@/api/entrust/index.js";
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ pleaseEntrustDetail,
|
|
|
|
|
+ getProduceTaskList,
|
|
|
|
|
+} from "@/api/entrust/index.js";
|
|
|
|
|
+
|
|
|
|
|
+import { getDictByCode } from "@/api/common";
|
|
|
|
|
|
|
|
const PLAN_TYPE_MAP = {
|
|
const PLAN_TYPE_MAP = {
|
|
|
1: "内销计划",
|
|
1: "内销计划",
|
|
@@ -310,6 +321,7 @@ export default {
|
|
|
beEntrustedDeptName: "",
|
|
beEntrustedDeptName: "",
|
|
|
},
|
|
},
|
|
|
orderList: [],
|
|
orderList: [],
|
|
|
|
|
+ typeList: [],
|
|
|
tabList: ["基本信息", "产品信息"],
|
|
tabList: ["基本信息", "产品信息"],
|
|
|
curNow: 0,
|
|
curNow: 0,
|
|
|
stickyPlaceholderHeight: 0,
|
|
stickyPlaceholderHeight: 0,
|
|
@@ -322,7 +334,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
typeLabel() {
|
|
typeLabel() {
|
|
|
- return this.form.type ? this.form.type + "" : "";
|
|
|
|
|
|
|
+ if (!this.form.type && this.form.type !== 0) return "";
|
|
|
|
|
+ const item = this.typeList.find((i) => i.value == this.form.type);
|
|
|
|
|
+ return item ? item.label : "";
|
|
|
},
|
|
},
|
|
|
priorityLabel() {
|
|
priorityLabel() {
|
|
|
const item = this.options.find((i) => i.value == this.form.priority);
|
|
const item = this.options.find((i) => i.value == this.form.priority);
|
|
@@ -330,6 +344,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
async mounted() {
|
|
async mounted() {
|
|
|
|
|
+ await this.getTypeList();
|
|
|
this.initStickyTop();
|
|
this.initStickyTop();
|
|
|
await this.init();
|
|
await this.init();
|
|
|
this.updateStickyPlaceholderHeight();
|
|
this.updateStickyPlaceholderHeight();
|
|
@@ -344,6 +359,22 @@ export default {
|
|
|
this.stickyTop = 50;
|
|
this.stickyTop = 50;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ async getTypeList() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await getDictByCode("entrust_type");
|
|
|
|
|
+ if (res?.length != 0) {
|
|
|
|
|
+ let list = res.map((item) => {
|
|
|
|
|
+ let key = Object.keys(item)[0];
|
|
|
|
|
+ return { value: Number(key), label: item[key] };
|
|
|
|
|
+ });
|
|
|
|
|
+ this.typeList = list;
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error("获取类型列表失败", error);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
updateStickyPlaceholderHeight() {
|
|
updateStickyPlaceholderHeight() {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
const query = uni.createSelectorQuery().in(this);
|
|
const query = uni.createSelectorQuery().in(this);
|