|
@@ -1,4 +1,6 @@
|
|
import ImageUpload from '@/components/file-upload'
|
|
import ImageUpload from '@/components/file-upload'
|
|
|
|
+import { getWebsit } from "@/api/customerManagement.js"
|
|
|
|
+import { listPageV2 } from "@/api/auxiliaryFittings/supplier";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -104,7 +106,7 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '辅材名称',
|
|
label: '辅材名称',
|
|
- prop: 'avatar',
|
|
|
|
|
|
+ prop: 'goodsName',
|
|
},
|
|
},
|
|
render: (h, { row, column, index }) => {
|
|
render: (h, { row, column, index }) => {
|
|
return (
|
|
return (
|
|
@@ -124,7 +126,7 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '配件名称',
|
|
label: '配件名称',
|
|
- prop: 'avatar',
|
|
|
|
|
|
+ prop: 'goodsName',
|
|
},
|
|
},
|
|
render: (h, { row, column, index }) => {
|
|
render: (h, { row, column, index }) => {
|
|
return (
|
|
return (
|
|
@@ -144,7 +146,7 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '单位',
|
|
label: '单位',
|
|
- prop: 'purchaseId',
|
|
|
|
|
|
+ prop: 'goodsStockUnit',
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
@@ -212,7 +214,7 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '商品代码',
|
|
label: '商品代码',
|
|
- prop: '',
|
|
|
|
|
|
+ prop: 'goodsCode',
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
@@ -234,7 +236,7 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '配件编码',
|
|
label: '配件编码',
|
|
- prop: '',
|
|
|
|
|
|
+ prop: 'goodsId',
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
@@ -245,7 +247,7 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '适用品牌',
|
|
label: '适用品牌',
|
|
- prop: '',
|
|
|
|
|
|
+ prop: 'brand',
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
@@ -256,7 +258,7 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '适用产品大类',
|
|
label: '适用产品大类',
|
|
- prop: '',
|
|
|
|
|
|
+ prop: 'productCategory',
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
@@ -267,7 +269,7 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '采购数量',
|
|
label: '采购数量',
|
|
- prop: '',
|
|
|
|
|
|
+ prop: 'recQty',
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
@@ -278,7 +280,7 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '采购价格',
|
|
label: '采购价格',
|
|
- prop: '',
|
|
|
|
|
|
+ prop: 'cost',
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
@@ -289,18 +291,18 @@ export default {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '采购金额',
|
|
label: '采购金额',
|
|
- prop: '',
|
|
|
|
|
|
+ prop: 'costValue',
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
return []
|
|
return []
|
|
})(),
|
|
})(),
|
|
...(() => {
|
|
...(() => {
|
|
- if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType)) {
|
|
|
|
|
|
+ if (this.formData.flag === "SAVE" && !!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType)) {
|
|
return [{
|
|
return [{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '库存数量',
|
|
label: '库存数量',
|
|
- prop: '',
|
|
|
|
|
|
+ prop: 'stockQty',
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
@@ -317,17 +319,21 @@ export default {
|
|
return (
|
|
return (
|
|
<div class='operation-btns'>
|
|
<div class='operation-btns'>
|
|
<el-button type="text" onClick={() => {
|
|
<el-button type="text" onClick={() => {
|
|
- this.formData.items.map((item, index_) => {
|
|
|
|
- if (index_ == index) {
|
|
|
|
- item.isEditRow = true
|
|
|
|
- } else {
|
|
|
|
- item.isEditRow = false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }}>编辑</el-button>
|
|
|
|
- <el-button type="text" onClick={() => {
|
|
|
|
this.formData.items.splice(index, 1)
|
|
this.formData.items.splice(index, 1)
|
|
}}>删除</el-button>
|
|
}}>删除</el-button>
|
|
|
|
+ {
|
|
|
|
+ !row.isEditRow ?
|
|
|
|
+ <el-button type="text" onClick={() => {
|
|
|
|
+ this.formData.items.map((item, index_) => {
|
|
|
|
+ if (index_ == index) {
|
|
|
|
+ item.isEditRow = true
|
|
|
|
+ } else {
|
|
|
|
+ item.isEditRow = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }}>编辑</el-button> :
|
|
|
|
+ null
|
|
|
|
+ }
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
@@ -365,10 +371,14 @@ export default {
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
<el-descriptions border title="" column={2} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '42%' }} style="margin-top:-1px">
|
|
<el-descriptions border title="" column={2} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '42%' }} style="margin-top:-1px">
|
|
<el-descriptions-item label="网点名称">
|
|
<el-descriptions-item label="网点名称">
|
|
- {this.formData.websitName}
|
|
|
|
|
|
+ <el-select style="width:100%" value={this.formData.websitId} onInput={(val) => { this.formData.websitId = val }} placeholder="请选择">
|
|
|
|
+ {this.getWebsitList.map(item => <el-option key={item.websitId} label={item.name} value={item.websitId}></el-option>)}
|
|
|
|
+ </el-select>
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="供应商名称">
|
|
<el-descriptions-item label="供应商名称">
|
|
- {this.formData.venderName}
|
|
|
|
|
|
+ <el-select style="width:100%" value={this.formData.venderId} onInput={(val) => { this.formData.venderId = val }} placeholder="请选择">
|
|
|
|
+ {this.listPageV2Data.map(item => <el-option key={item.venderId} label={item.venderName} value={item.venderId}></el-option>)}
|
|
|
|
+ </el-select>
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
{
|
|
{
|
|
@@ -378,10 +388,10 @@ export default {
|
|
{this.formData.purchaseId}
|
|
{this.formData.purchaseId}
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="退货数量">
|
|
<el-descriptions-item label="退货数量">
|
|
- {this.formData.purchaseId}
|
|
|
|
|
|
+ {this.formData.retTotalQty}
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="退款金额">
|
|
<el-descriptions-item label="退款金额">
|
|
- {this.formData.purchaseId}
|
|
|
|
|
|
+ {this.formData.retTotalAmount}
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
</el-descriptions> : null
|
|
</el-descriptions> : null
|
|
}
|
|
}
|
|
@@ -438,6 +448,7 @@ export default {
|
|
<div>
|
|
<div>
|
|
{!!~[0, 1].indexOf(this.formDialogType) ? <div style="margin-bottom:8px">
|
|
{!!~[0, 1].indexOf(this.formDialogType) ? <div style="margin-bottom:8px">
|
|
<el-button onClick={() => {
|
|
<el-button onClick={() => {
|
|
|
|
+ this.formData.items.map((item) => {item.isEditRow = false})
|
|
this.formData.items.push({
|
|
this.formData.items.push({
|
|
"brand": "",
|
|
"brand": "",
|
|
"companyWechatId": "",
|
|
"companyWechatId": "",
|
|
@@ -445,6 +456,7 @@ export default {
|
|
"costValue": "",
|
|
"costValue": "",
|
|
"goodsCategoryId": "",
|
|
"goodsCategoryId": "",
|
|
"goodsCategoryName": "",
|
|
"goodsCategoryName": "",
|
|
|
|
+ "goodsCode": "",
|
|
"goodsId": "",
|
|
"goodsId": "",
|
|
"goodsName": "",
|
|
"goodsName": "",
|
|
"goodsSpecification": "",
|
|
"goodsSpecification": "",
|
|
@@ -459,7 +471,8 @@ export default {
|
|
"retQty": "",
|
|
"retQty": "",
|
|
"stockQty": "",
|
|
"stockQty": "",
|
|
"websitId": "",
|
|
"websitId": "",
|
|
- "websitName": ""
|
|
|
|
|
|
+ "websitName": "",
|
|
|
|
+ "isEditRow": true
|
|
})
|
|
})
|
|
// if (this.pageType == "auxiliaryMaterialsStorage") {
|
|
// if (this.pageType == "auxiliaryMaterialsStorage") {
|
|
// } else if (this.pageType == "returnAuxiliaryMaterials") {
|
|
// } else if (this.pageType == "returnAuxiliaryMaterials") {
|
|
@@ -492,12 +505,15 @@ export default {
|
|
},
|
|
},
|
|
// 打开
|
|
// 打开
|
|
openForm() {
|
|
openForm() {
|
|
- {/* Promise.all([
|
|
|
|
-
|
|
|
|
- ]).then(([res1]) => {
|
|
|
|
-
|
|
|
|
- }) */}
|
|
|
|
- this.formDialog = true
|
|
|
|
|
|
+ Promise.all([
|
|
|
|
+ getWebsit(),
|
|
|
|
+ listPageV2({ "pageNum": 1, "pageSize": -1, "params": [] })
|
|
|
|
+ ]).then(([res1, res2]) => {
|
|
|
|
+ this.getWebsitList = res1.data.filter(item => item.type == "B")
|
|
|
|
+ this.listPageV2Data = res2.data.records
|
|
|
|
+ console.log(res1.data.filter(item => item.type == "B"), res2.data.records)
|
|
|
|
+ this.formDialog = true
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 添加
|
|
// 添加
|
|
addData() {
|
|
addData() {
|