|
@@ -8,10 +8,10 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
- <el-button v-if="form.status == 1" size="small" @click="disabled(0)">
|
|
|
+ <el-button v-if="form.enableOrNot == 1" size="small" @click="disabled(0)">
|
|
|
启用
|
|
|
</el-button>
|
|
|
- <el-button v-if="form.status == 0" size="small" @click="disabled(1)">
|
|
|
+ <el-button v-if="form.enableOrNot == 0" size="small" @click="disabled(1)">
|
|
|
禁用
|
|
|
</el-button>
|
|
|
<el-button type="primary" size="small" @click="editCustomer">
|
|
@@ -39,54 +39,49 @@
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
- <!--<trade-card title="库存管理" v-loading="loadingBtn">-->
|
|
|
- <!-- <avue-crud ref="crud" :option="optionList" :data="data" :table-loading="loading" @saveColumn="saveColumn"-->
|
|
|
- <!-- @resetColumn="resetColumn" :cell-style="cellStyle" @row-update="rowUpdate" @row-save="rowSave">-->
|
|
|
- <!-- <template slot="headerSerial">-->
|
|
|
- <!-- <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"-->
|
|
|
- <!-- :disabled="detailData.status == 1" circle></el-button>-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- <template slot="storageIdHeader" slot-scope="{column}">-->
|
|
|
- <!-- <span style="color: #409EFF;cursor: pointer" @click.stop="storageVisible = true">仓库</span>-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- <template slot="menu" slot-scope="{ row, index }">-->
|
|
|
- <!-- <el-button size="small" type="text" @click="rowCell(row, index)">{{ row.$cellEdit ? "保存" : "修改" }}-->
|
|
|
- <!-- </el-button>-->
|
|
|
- <!-- <el-button size="small" type="text" @click="rowDel(row, index)">删除</el-button>-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- </avue-crud>-->
|
|
|
- <!--</trade-card>-->
|
|
|
<containerTitle title="附件信息"></containerTitle>
|
|
|
<c-upload :data="filesList" display deleteUrl="/api/blade-client/goodsfiles/delete" :enumerationValue="160" />
|
|
|
<el-dialog title="设置产品分类" v-dialogDrag :visible.sync="goodsTypeVisible" class="avue-dialog"
|
|
|
width="80%" append-to-body @closed="goodsTypeClosed">
|
|
|
<span>
|
|
|
<!-- <avue-form :key="reload" ref="goodsType" v-model="form2" :option="option2" style="margin-top:20px"></avue-form> -->
|
|
|
- <goods-type></goods-type>
|
|
|
+ <!--<goods-type></goods-type>-->
|
|
|
+ <corp-type></corp-type>
|
|
|
</span>
|
|
|
<div class="avue-dialog__footer">
|
|
|
<el-button @click="goodsTypeVisible = false" size="mini">取 消</el-button>
|
|
|
<el-button @click="saveGoodstype" type="primary" size="mini">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <el-dialog title="添加仓库" v-dialogDrag :visible.sync="storageVisible" class="avue-dialog avue-dialog--top" width="30%" append-to-body @closed="storageClosed">
|
|
|
- <span>
|
|
|
- <avue-form :key="reload2" ref="storage" v-model="form3" :option="option3" style="margin-top:20px"></avue-form>
|
|
|
- </span>
|
|
|
- <div class="avue-dialog__footer">
|
|
|
- <el-button @click="storageVisible = false" size="mini">取 消</el-button>
|
|
|
- <el-button @click="savestorage" type="primary" size="mini">确 定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
+ <!--<el-dialog title="添加仓库" v-dialogDrag :visible.sync="storageVisible" class="avue-dialog avue-dialog--top" width="30%" append-to-body @closed="storageClosed">-->
|
|
|
+ <!-- <span>-->
|
|
|
+ <!-- <avue-form :key="reload2" ref="storage" v-model="form3" :option="option3" style="margin-top:20px"></avue-form>-->
|
|
|
+ <!-- </span>-->
|
|
|
+ <!-- <div class="avue-dialog__footer">-->
|
|
|
+ <!-- <el-button @click="storageVisible = false" size="mini">取 消</el-button>-->
|
|
|
+ <!-- <el-button @click="savestorage" type="primary" size="mini">确 定</el-button>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!--</el-dialog>-->
|
|
|
<dictbiz-dialog ref="dictbiz" title="添加单位" code="unit" parentId="1585962784498225154" @closed="getAllWorkDicts"></dictbiz-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getGoodstype, getDetails, goodsTypesubmit, getStoragetype, submit, itemRemove, disabled, getStoragelist, storagesubmit } from "@/api/basicData/product";
|
|
|
+// import {
|
|
|
+// getGoodstype,
|
|
|
+// getDetails,
|
|
|
+// goodsTypesubmit,
|
|
|
+// getStoragetype,
|
|
|
+// submit,
|
|
|
+// itemRemove,
|
|
|
+// disabled,
|
|
|
+// getStoragelist,
|
|
|
+// storagesubmit } from "@/api/basicData/product";
|
|
|
+import {getDetails, getCorpType, submit, customerList, itemDel,disabled} from "@/api/tirePartsMall/basicData/commodityInformation"
|
|
|
import { optionList } from "./js/optionList";
|
|
|
import goodsType from '@/components/goodsType/index'
|
|
|
+import corpType from './components/index'
|
|
|
export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
@@ -147,8 +142,14 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "品牌",
|
|
|
- prop: "brand",
|
|
|
+ prop: "brandId",
|
|
|
span: 8,
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-sales-part/brandDesc/listAll'
|
|
|
},
|
|
|
{
|
|
|
label: "出厂编码",
|
|
@@ -174,11 +175,23 @@ export default {
|
|
|
label: "供应商",
|
|
|
prop: "corpId",
|
|
|
span: 8,
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-sales-part/corpsDesc/listAll'
|
|
|
},
|
|
|
{
|
|
|
label: "所属公司",
|
|
|
- prop: "artsVisionId",
|
|
|
+ prop: "salesCompanyId",
|
|
|
span: 8,
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'fullName',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-system/dept/top-list'
|
|
|
},
|
|
|
{
|
|
|
label: "快捷品名查询",
|
|
@@ -338,17 +351,25 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "防爆",
|
|
|
- prop: "inventoryAlert",
|
|
|
- span: 8
|
|
|
+ prop: "explosionProof",
|
|
|
+ span: 8,
|
|
|
+ type:'select',
|
|
|
+ dicData:[{
|
|
|
+ label:'否',
|
|
|
+ value:0
|
|
|
+ },{
|
|
|
+ label:'是',
|
|
|
+ value:1
|
|
|
+ }],
|
|
|
},
|
|
|
{
|
|
|
label: "原厂",
|
|
|
- prop: "inventoryAlert",
|
|
|
+ prop: "originalFactory",
|
|
|
span: 8
|
|
|
},
|
|
|
{
|
|
|
label: "自修补",
|
|
|
- prop: "inventoryAlert",
|
|
|
+ prop: "selfRecovery",
|
|
|
span: 8
|
|
|
},
|
|
|
{
|
|
@@ -432,8 +453,8 @@ export default {
|
|
|
},
|
|
|
filesList: [],
|
|
|
props: {
|
|
|
- label: 'title',
|
|
|
- value: 'value'
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
},
|
|
|
props2: {
|
|
|
label: 'dictValue',
|
|
@@ -445,7 +466,8 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
|
- goodsType
|
|
|
+ goodsType,
|
|
|
+ corpType
|
|
|
},
|
|
|
props: {
|
|
|
detailData: {
|
|
@@ -470,14 +492,18 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getAllWorkDicts() {
|
|
|
- getGoodstype().then(res => {
|
|
|
- this.goodsTypeList = res.data.data;
|
|
|
- this.findObject(this.option2.column, "parentId").dicData = res.data.data;
|
|
|
- });
|
|
|
- getStoragelist().then(res => {
|
|
|
- this.findObject(this.optionList.column, "storageId").dicData = res.data;
|
|
|
- this.findObject(this.option3.column, "parentId").dicData = res.data;
|
|
|
+ // getGoodstype().then(res => {
|
|
|
+ // this.goodsTypeList = res.data.data;
|
|
|
+ // this.findObject(this.option2.column, "parentId").dicData = res.data.data;
|
|
|
+ // });
|
|
|
+ customerList({corpType: "SP"}).then(res => {
|
|
|
+ this.goodsTypeList = res.data.data.records;
|
|
|
+ this.findObject(this.option2.column, "parentId").dicData = res.data.data.records;
|
|
|
});
|
|
|
+ // getStoragelist().then(res => {
|
|
|
+ // this.findObject(this.optionList.column, "storageId").dicData = res.data;
|
|
|
+ // this.findObject(this.option3.column, "parentId").dicData = res.data;
|
|
|
+ // });
|
|
|
this.getWorkDicts("unit").then(res => {
|
|
|
this.unitList = res.data.data;
|
|
|
});
|
|
@@ -521,7 +547,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
disabled(val) {
|
|
|
- disabled({ id: this.form.id, status: val }).then(res => {
|
|
|
+ disabled({ id: this.form.id, enableOrNot: val }).then(res => {
|
|
|
this.getDetail(this.detailData.id);
|
|
|
})
|
|
|
},
|
|
@@ -563,11 +589,11 @@ export default {
|
|
|
},
|
|
|
getDetail(id) {
|
|
|
this.loadingBtn = true
|
|
|
- getDetails({ goodsId: id })
|
|
|
+ getDetails({ id: id })
|
|
|
.then(res => {
|
|
|
this.form = res.data.data;
|
|
|
- this.data = res.data.data.stockGoodsList;
|
|
|
- this.filesList = res.data.data.filesList
|
|
|
+ // this.data = res.data.data.stockGoodsList;
|
|
|
+ this.filesList = res.data.data.goodsFilesList
|
|
|
this.whetherChange(res.data.data.whether)
|
|
|
})
|
|
|
.finally(() => {
|
|
@@ -593,13 +619,13 @@ export default {
|
|
|
...this.form,
|
|
|
code: this.form.cname,
|
|
|
type: 0,
|
|
|
- stockGoodsList: this.data,
|
|
|
- filesList: this.filesList
|
|
|
+ // stockGoodsList: this.data,
|
|
|
+ goodsFilesList: this.filesList
|
|
|
}).then(res => {
|
|
|
this.$message.success("保存成功");
|
|
|
this.form = res.data.data;
|
|
|
- this.data = res.data.data.stockGoodsList;
|
|
|
- this.filesList = res.data.data.filesList;
|
|
|
+ // this.data = res.data.data.stockGoodsList;
|
|
|
+ this.filesList = res.data.data.goodsFilesList;
|
|
|
setTimeout(() => {
|
|
|
this.backToList()
|
|
|
}, 1000);
|