|
@@ -44,7 +44,7 @@
|
|
|
@get-list="getList"
|
|
|
@clickReset="clickReset">
|
|
|
<template #typeExpand="{ item }">
|
|
|
- <div style="padding: 0px 20px; box-sizing: border-box" v-if="item.bomSpecList && item.bomSpecList.length > 0">
|
|
|
+ <div style="box-sizing: border-box" v-if="item.bomSpecList && item.bomSpecList.length > 0">
|
|
|
<div
|
|
|
v-for="spec in item.bomSpecList"
|
|
|
:key="spec.id"
|
|
@@ -70,9 +70,31 @@
|
|
|
<div style="width: 180px">
|
|
|
{{ `${spec.length} * ${spec.width} * ${spec.height}(cm³)` }}
|
|
|
</div>
|
|
|
- <div style="width: 60px; text-align: center" v-if="props.selectStatus">
|
|
|
+ <div style="width: 60px; text-align: center" v-if="props.selectStatus && !props.priceSystemId">
|
|
|
<el-button type="text" @click="selectBOM(spec)" :disabled="selectBtnStatus" v-db-click>选择</el-button>
|
|
|
</div>
|
|
|
+ <div style="width: 140px; padding: 0 12px" v-if="props.priceSystemId">
|
|
|
+ <el-input-number
|
|
|
+ onmousewheel="return false;"
|
|
|
+ v-model="spec.internalSellingPrice"
|
|
|
+ placeholder="对内销售价"
|
|
|
+ style="width: 100%"
|
|
|
+ :controls="false"
|
|
|
+ :min="0"
|
|
|
+ :precision="2"
|
|
|
+ @change="changePrice(spec)" />
|
|
|
+ </div>
|
|
|
+ <div style="width: 140px; padding: 0 12px" v-if="props.priceSystemId">
|
|
|
+ <el-input-number
|
|
|
+ onmousewheel="return false;"
|
|
|
+ v-model="spec.externalSellingPrice"
|
|
|
+ placeholder="对外销售价"
|
|
|
+ style="width: 100%"
|
|
|
+ :controls="false"
|
|
|
+ :min="0"
|
|
|
+ :precision="2"
|
|
|
+ @change="changePrice(spec)" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -81,6 +103,19 @@
|
|
|
<a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickName(item)">{{ item.name }}</a>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #priceBillingStandardId="{ item }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-select v-model="item.priceBillingStandardId" placeholder="加工报价" clearable @change="changePriceBillingStandard(item)">
|
|
|
+ <el-option v-for="item in priceBillingStandardList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #internalSellingPrice>
|
|
|
+ <div style="width: 100%"></div>
|
|
|
+ </template>
|
|
|
+ <template #externalSellingPrice>
|
|
|
+ <div style="width: 100%"></div>
|
|
|
+ </template>
|
|
|
</byTable>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
@@ -116,6 +151,7 @@ const props = defineProps({
|
|
|
selectStatus: Boolean,
|
|
|
bomClassifyIdList: Array,
|
|
|
expressStatus: Boolean,
|
|
|
+ priceSystemId: String,
|
|
|
});
|
|
|
const filterTree = ref("");
|
|
|
const treeCategory = ref(null);
|
|
@@ -157,6 +193,7 @@ const sourceList = ref({
|
|
|
colour: "",
|
|
|
bomClassifyId: "",
|
|
|
bomClassifyIdList: [],
|
|
|
+ priceSystemId: "",
|
|
|
},
|
|
|
});
|
|
|
const loading = ref(false);
|
|
@@ -230,7 +267,7 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "项目小类",
|
|
|
prop: "itemSubclass",
|
|
|
- width: 140,
|
|
|
+ width: 120,
|
|
|
},
|
|
|
render(val) {
|
|
|
return proxy.dictKeyValue(val, proxy.useUserStore().allDict["bom_itemSubclass"]);
|
|
@@ -240,7 +277,7 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "种类",
|
|
|
prop: "species",
|
|
|
- width: 140,
|
|
|
+ width: 120,
|
|
|
},
|
|
|
render(val) {
|
|
|
return proxy.dictKeyValue(val, proxy.useUserStore().allDict["bom_species"]);
|
|
@@ -256,74 +293,104 @@ const config = computed(() => {
|
|
|
return proxy.dictKeyValue(val, proxy.useUserStore().allDict["bom_chromatophore"]);
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- attrs: {
|
|
|
- label: "压纹工艺",
|
|
|
- prop: "embossingProcess",
|
|
|
- width: 140,
|
|
|
- },
|
|
|
- render(val) {
|
|
|
- return proxy.dictKeyValue(val, proxy.useUserStore().allDict["bom_embossingProcess"]);
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- attrs: {
|
|
|
- label: "正面纹路",
|
|
|
- prop: "frontGrain",
|
|
|
- width: 140,
|
|
|
- },
|
|
|
- render(val) {
|
|
|
- return proxy.dictKeyValue(val, proxy.useUserStore().allDict["bom_frontGrain"]);
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- attrs: {
|
|
|
- label: "背面纹路",
|
|
|
- prop: "reverseGrain",
|
|
|
- width: 140,
|
|
|
- },
|
|
|
- render(val) {
|
|
|
- return proxy.dictKeyValue(val, proxy.useUserStore().allDict["bom_reverseGrain"]);
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- attrs: {
|
|
|
- label: "操作",
|
|
|
- width: 120,
|
|
|
- align: "center",
|
|
|
- fixed: "right",
|
|
|
- },
|
|
|
- renderHTML(row) {
|
|
|
- return [
|
|
|
- props.selectStatus
|
|
|
- ? {}
|
|
|
- : {
|
|
|
- attrs: {
|
|
|
- label: "编辑",
|
|
|
- type: "primary",
|
|
|
- text: true,
|
|
|
- },
|
|
|
- el: "button",
|
|
|
- click() {
|
|
|
- clickUpdate(row);
|
|
|
- },
|
|
|
- },
|
|
|
- props.selectStatus
|
|
|
- ? {}
|
|
|
- : {
|
|
|
- attrs: {
|
|
|
- label: "删除",
|
|
|
- type: "primary",
|
|
|
- text: true,
|
|
|
- },
|
|
|
- el: "button",
|
|
|
- click() {
|
|
|
- clickDelete(row);
|
|
|
- },
|
|
|
- },
|
|
|
- ];
|
|
|
- },
|
|
|
- },
|
|
|
+ props.priceSystemId
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "加工报价",
|
|
|
+ slot: "priceBillingStandardId",
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {
|
|
|
+ attrs: {
|
|
|
+ label: "压纹工艺",
|
|
|
+ prop: "embossingProcess",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.dictKeyValue(val, proxy.useUserStore().allDict["bom_embossingProcess"]);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ props.priceSystemId
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "对内销售价(含税)",
|
|
|
+ slot: "internalSellingPrice",
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {
|
|
|
+ attrs: {
|
|
|
+ label: "正面纹路",
|
|
|
+ prop: "frontGrain",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.dictKeyValue(val, proxy.useUserStore().allDict["bom_frontGrain"]);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ props.priceSystemId
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "对内销售价(含税)",
|
|
|
+ slot: "externalSellingPrice",
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {
|
|
|
+ attrs: {
|
|
|
+ label: "背面纹路",
|
|
|
+ prop: "reverseGrain",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.dictKeyValue(val, proxy.useUserStore().allDict["bom_reverseGrain"]);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ props.priceSystemId
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ width: 16,
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {
|
|
|
+ attrs: {
|
|
|
+ label: "操作",
|
|
|
+ width: 120,
|
|
|
+ align: "center",
|
|
|
+ fixed: "right",
|
|
|
+ },
|
|
|
+ renderHTML(row) {
|
|
|
+ return [
|
|
|
+ props.selectStatus
|
|
|
+ ? {}
|
|
|
+ : {
|
|
|
+ attrs: {
|
|
|
+ label: "编辑",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickUpdate(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ props.selectStatus
|
|
|
+ ? {}
|
|
|
+ : {
|
|
|
+ attrs: {
|
|
|
+ label: "删除",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickDelete(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ },
|
|
|
];
|
|
|
});
|
|
|
const getList = async (req, status) => {
|
|
@@ -342,7 +409,12 @@ const getList = async (req, status) => {
|
|
|
sourceList.value.pagination.bomClassifyId = "1682221528948760578";
|
|
|
}
|
|
|
loading.value = true;
|
|
|
- proxy.post("/bom/page", sourceList.value.pagination).then((res) => {
|
|
|
+ let path = "/bom/page";
|
|
|
+ if (props.priceSystemId) {
|
|
|
+ path = "/priceSystem/getBomPriceDetail";
|
|
|
+ sourceList.value.pagination.priceSystemId = props.priceSystemId;
|
|
|
+ }
|
|
|
+ proxy.post(path, sourceList.value.pagination).then((res) => {
|
|
|
sourceList.value.data = res.rows;
|
|
|
sourceList.value.pagination.total = res.total;
|
|
|
setTimeout(() => {
|
|
@@ -476,6 +548,40 @@ const selectBOM = (item) => {
|
|
|
selectBtnStatus.value = false;
|
|
|
}, 200);
|
|
|
};
|
|
|
+const priceBillingStandardList = ref([]);
|
|
|
+const getPriceBillingStandard = () => {
|
|
|
+ proxy.post("/priceBillingStandard/list", {}).then((res) => {
|
|
|
+ if (res && res.length > 0) {
|
|
|
+ priceBillingStandardList.value = res.map((item) => {
|
|
|
+ return {
|
|
|
+ dictKey: item.id,
|
|
|
+ dictValue: item.name,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+if (props.priceSystemId) {
|
|
|
+ getPriceBillingStandard();
|
|
|
+}
|
|
|
+const changePriceBillingStandard = (row) => {
|
|
|
+ let data = {
|
|
|
+ priceSystemId: props.priceSystemId,
|
|
|
+ bomId: row.id,
|
|
|
+ priceBillingStandardId: row.priceBillingStandardId,
|
|
|
+ };
|
|
|
+ proxy.post("/priceSystemBom/saveOrEdit", data).then();
|
|
|
+};
|
|
|
+const changePrice = (row) => {
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ priceSystemId: props.priceSystemId,
|
|
|
+ bomSpecId: row.id,
|
|
|
+ internalSellingPrice: row.internalSellingPrice,
|
|
|
+ externalSellingPrice: row.externalSellingPrice,
|
|
|
+ };
|
|
|
+ proxy.post("/priceSystemBomSpec/saveOrEdit", data).then();
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|