|
@@ -29,7 +29,7 @@ export default {
|
|
|
materialNormList: [],
|
|
|
peijianList: [],
|
|
|
websitPurchaseInList: [],
|
|
|
- listPageV2Data:[],
|
|
|
+ listPageV2Data: [],
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -134,7 +134,7 @@ export default {
|
|
|
columns() {
|
|
|
return [
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '大类名称',
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '小类名称',
|
|
@@ -220,7 +220,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '辅材',
|
|
@@ -268,7 +268,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '配件',
|
|
@@ -317,7 +317,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '单位',
|
|
@@ -328,7 +328,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '数量',
|
|
@@ -366,7 +366,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '退货数量',
|
|
@@ -404,7 +404,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '退款金额',
|
|
@@ -415,7 +415,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '商品代码',
|
|
@@ -426,7 +426,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '规格型号',
|
|
@@ -437,7 +437,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '配件编码',
|
|
@@ -448,7 +448,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '适用品牌',
|
|
@@ -459,7 +459,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '适用产品大类',
|
|
@@ -470,7 +470,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '采购数量',
|
|
@@ -481,7 +481,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '采购价格',
|
|
@@ -492,7 +492,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '采购金额',
|
|
@@ -503,7 +503,7 @@ export default {
|
|
|
return []
|
|
|
})(),
|
|
|
...(() => {
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.pageType) && this.formData.flag !== "OK") {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.$route?.name) && this.formData.flag !== "OK") {
|
|
|
return [{
|
|
|
columnAttributes: {
|
|
|
label: '库存数量',
|
|
@@ -543,7 +543,7 @@ export default {
|
|
|
this.formData.items.map((item, index_) => {
|
|
|
if (index_ == index) {
|
|
|
item.isEditRow = true
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType) && row.goodsCategoryId) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name) && row.goodsCategoryId) {
|
|
|
materialNormList({ isShowStockQty: true, websitId: this.formData.websitId, "pageNum": 1, "pageSize": -1, "params": [{ "param": "b.category_id", "compare": "=", "value": row.goodsCategoryId }, { "param": "a.status", "compare": "=", "value": "ON" }] }).then(res => {
|
|
|
this.materialNormList = res.data.records
|
|
|
})
|
|
@@ -584,7 +584,7 @@ export default {
|
|
|
{({ SAVE: "保存", OK: "通过", FAIL: "失败" })[this.formData.flag]}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="单据编号">
|
|
|
- {(!!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this.pageType) ? this.formData.purchaseId : this.formData.purchaseRetId) || ''}
|
|
|
+ {(!!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this.$route?.name) ? this.formData.purchaseId : this.formData.purchaseRetId) || ''}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="所属商户" contentStyle={{ width: '42%' }}>
|
|
|
{this.formData.companyWechatName}
|
|
@@ -606,7 +606,7 @@ export default {
|
|
|
} else {
|
|
|
this.formData['websitName'] = ''
|
|
|
}
|
|
|
- if (~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ if (~['partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
if (val) {
|
|
|
peijianList({ isShowStockQty: true, websitId: val, "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.norm_type", "compare": "=", "value": "M" }] }).then((res) => {
|
|
|
this.peijianList = res.data.records
|
|
@@ -648,7 +648,7 @@ export default {
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
{
|
|
|
- !!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType) ?
|
|
|
+ !!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.$route?.name) ?
|
|
|
<el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
|
|
|
<el-descriptions-item label="采购入库单号" contentStyle={{ width: '42%' }}>
|
|
|
<div class="redbordererr">
|
|
@@ -677,7 +677,7 @@ export default {
|
|
|
}))
|
|
|
})
|
|
|
var row = this.formData.items[0]
|
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType) && row && row.goodsCategoryId) {
|
|
|
+ if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name) && row && row.goodsCategoryId) {
|
|
|
materialNormList({ isShowStockQty: true, websitId: this.formData.websitId, "pageNum": 1, "pageSize": -1, "params": [{ "param": "b.category_id", "compare": "=", "value": row.goodsCategoryId }, { "param": "a.status", "compare": "=", "value": "ON" }] }).then(res => {
|
|
|
this.materialNormList = res.data.records
|
|
|
})
|
|
@@ -837,15 +837,16 @@ export default {
|
|
|
var runs = [
|
|
|
(res) => { this.getWebsitList = res.data.filter(item => item.type == "C") },
|
|
|
]
|
|
|
-
|
|
|
- if (~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
|
|
|
+ console.log(this.$route?.name)
|
|
|
+ if (~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
|
|
|
+ console.log(12343455)
|
|
|
req.push(...[
|
|
|
listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.vender_type", "compare": "=", "value": ["A", "M"] }] })
|
|
|
])
|
|
|
runs.push(...[
|
|
|
(res) => { this.listPageV2Data = res.data.records }
|
|
|
])
|
|
|
- } else if (~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
+ } else if (~['partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
|
|
|
req.push(...[
|
|
|
listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.vender_type", "compare": "=", "value": ["P", "A"] }] })
|
|
|
])
|
|
@@ -854,7 +855,7 @@ export default {
|
|
|
])
|
|
|
}
|
|
|
|
|
|
- if (~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
|
|
|
+ if (~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
|
|
|
req.push(...[
|
|
|
materialCategoryList({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.category_level", "compare": "=", "value": "1" }] }),
|
|
|
materialCategoryList({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.category_level", "compare": "=", "value": "2" }] }),
|
|
@@ -863,7 +864,7 @@ export default {
|
|
|
(res) => { this.materialCategoryListL1 = res.data.records },
|
|
|
(res) => { this.materialCategoryListL2 = res.data.records }
|
|
|
])
|
|
|
- } else if (~['partsStorage', 'partsReturn'].indexOf(this.pageType) && this.formData.websitId) {
|
|
|
+ } else if (~['partsStorage', 'partsReturn'].indexOf(this.$route?.name) && this.formData.websitId) {
|
|
|
req.push(...[
|
|
|
peijianList({ isShowStockQty: true, websitId: this.formData.websitId, "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.norm_type", "compare": "=", "value": "M" }] })
|
|
|
])
|
|
@@ -888,7 +889,7 @@ export default {
|
|
|
},
|
|
|
getorderlist(bool = true) {
|
|
|
if (this.formData.websitId && this.formData.venderId) {
|
|
|
- if (~['returnAuxiliaryMaterials'].indexOf(this.pageType)) {
|
|
|
+ if (~['returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
|
|
|
if (bool) {
|
|
|
this.websitPurchaseInList = []
|
|
|
this.formData.items = []
|
|
@@ -909,7 +910,7 @@ export default {
|
|
|
showLabel: `单号:${item.purchaseId} / 金额:${item.totalAmount} / 时间:${item.createTime.split(" ")[0]}`
|
|
|
}))
|
|
|
})
|
|
|
- } else if (~['partsReturn'].indexOf(this.pageType)) {
|
|
|
+ } else if (~['partsReturn'].indexOf(this.$route?.name)) {
|
|
|
if (bool) {
|
|
|
this.websitPurchaseInList = []
|
|
|
this.formData.items = []
|