Browse Source

供应商文档

java8
常熟吴彦祖 5 months ago
parent
commit
933b47b543
  1. 390
      src/views/modules/srmSupplier/com_supplierShare_share.vue
  2. 8
      src/views/modules/srmSupplier/com_supplierShare_supplierList.vue
  3. 20
      src/views/modules/srmSupplier/supplierShare.vue

390
src/views/modules/srmSupplier/com_supplierShare_share.vue

@ -0,0 +1,390 @@
<template>
<div class="customer-css">
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
<el-form :inline="true" label-position="top" style="margin-top: 0px">
<el-form-item label="Period Date:">
<el-date-picker
style="width: 120px"
v-model="searchData.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="addModal()">新增</el-button>
</el-form-item>
</el-form>
</el-form>
<el-table
:data="dataList"
:height=searchData.height
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="180"
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="deleteData(scope.row)"> Delete</a>
</template>
</el-table-column>
</el-table>
<el-dialog title="供应商" :visible.sync="addSupplierFlag" width="600px" style="margin-top: 7px" v-drag :close-on-click-modal="false">
<el-form inline="inline" label-position="top" :model="searchSupplierData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Supplier No">
<el-input v-model="searchSupplierData.supplierNo" clearable style="width: 151px"></el-input>
</el-form-item>
<el-form-item label="Supplier Name">
<el-input v-model="searchSupplierData.supplierName" clearable style="width: 151px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" style="padding: 3px 12px" @click="searchSupplierList()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="supplierList"
stripe
border
@selection-change="selectionList"
style="width: 100%;">
<el-table-column
header-align="center"
type="selection"
align="center"
width="55">
</el-table-column>
<el-table-column
prop="supplierNo"
header-align="center"
align="center"
min-width="100"
label="Supplier No">
</el-table-column>
<el-table-column
prop="supplierName"
header-align="center"
align="left"
min-width="200"
label="Supplier Name">
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 25px;text-align:center">
<el-button type="primary" @click="saveSelection()">确定</el-button>
<el-button @click="addSupplierFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
createNewSupplierContract,getNewSupplierContract,deleteSupplierContract
} from '@/api/srm/srmSupplier.js'
import Chooselist from '@/views/modules/common/Chooselist_eam'
import {ossUploadNoSaveOSS, previewOssFileById, queryOss} from "../../../api/oss/oss";
import {
deleteMaterialFamily, deleteSrmMaterialFamilySupplier,
saveOrUpdateFamily, saveSrmMaterialFamilySupplier,
searchMaterialFamilySupplierData,
searchMaterialFamilySupplierDataOther
} from '../../../api/srm/srmSupplier'
export default {
components: {
Chooselist
},
data() {
return {
dataList: [],
searchData: {
site: '',
username: this.$store.state.user.name,
materialFamilyNo: '',
materialFamilyDesc: '',
height:'300',
page: 1,
limit: 1000
},
searchSupplierData:{
id:'',
site:"",
supplierNo:'',
supplierName:'',
materialFamilyNo:'',
},
dataListLoading: false,
addSupplierFlag: false,
currentRow:'',
columnList: [
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '811031Table3Period',
tableId: "811031Table3",
tableName: "供应商份额",
columnProp: "period",
headerAlign: "center",
align: "left",
columnLabel: "Period",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '811031Table1PeriodStartDate',
tableId: "811031Table3",
tableName: "供应商份额",
columnProp: "periodStartDate",
headerAlign: "center",
align: "left",
columnLabel: "Period Start Date",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '811031Table1PeriodEndDate',
tableId: "811031Table3",
tableName: "供应商份额",
columnProp: "periodEndDate",
headerAlign: "center",
align: "left",
columnLabel: "Period End Date",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '811031Table1SupplierNo',
tableId: "811031Table3",
tableName: "供应商份额",
columnProp: "supplierNo",
headerAlign: "center",
align: "left",
columnLabel: "Supplier No",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '811031Table1SupplierName',
tableId: "811031Table3",
tableName: "供应商份额",
columnProp: "supplierName",
headerAlign: "center",
align: "left",
columnLabel: "Supplier Name",
columnWidth: '200',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '811031Table1EstimateShare',
tableId: "811031Table3",
tableName: "供应商份额",
columnProp: "estimateShare",
headerAlign: "center",
align: "right",
columnLabel: "Estimate Share",
columnWidth: '80',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '811031Table1ActualShare',
tableId: "811031Table3",
tableName: "供应商份额",
columnProp: "actualShare",
headerAlign: "center",
align: "right",
columnLabel: "Actual Share",
columnWidth: '80',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
],
supplierList:[],
listSelection:[],
}
},
methods: {
// S
getBaseList (val, type) {
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
// if (val === 1013) {
// if(type==1) {
// strVal = this.dataForm.partType
// }
// }
this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
// if (this.tagNo === 1013) {
// if(this.tagNo1==1) {
// this.dataForm.partType = val.Base_id
// this.dataForm.partTypeDesc = val.Base_desc
// }
// }
},
//
init(inData) {
//
this.searchData = JSON.parse(JSON.stringify(inData));
//
this.searchTable();
},
searchTable(){
searchMaterialFamilySupplierData(this.searchData).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList = data.rows
console.log(this.dataList)
} else {
this.dataList = [];
}
});
},
addModal(){
this.searchSupplierData={
site:this.searchData.site,
supplierNo:'',
supplierName:'',
materialFamilyNo:this.searchData.materialFamilyNo,
}
this.searchSupplierList();
this.addSupplierFlag=true;
},
searchSupplierList(){
searchMaterialFamilySupplierDataOther(this.searchSupplierData).then(({data}) => {
//
if (data && data.code == 0) {
this.supplierList = data.rows
console.log(this.dataList)
} else {
this.supplierList = [];
}
});
},
selectionList(val) {
this.listSelection = val
},
saveSelection(){
if(this.listSelection.length===0){
this.$message.warning('请选择供应商');
return false
}
saveSrmMaterialFamilySupplier( this.listSelection).then(({data})=>{
if (data && data.code === 0){
this.$message.success("保存成功");
this.searchTable();
this.addSupplierFlag=false
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error);
})
},
deleteData(row){
this.$confirm('是否删除此供应商?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteSrmMaterialFamilySupplier( row).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.searchTable();
this.addModelFlag=false
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error);
})
})
},
},
}
</script>
<style scoped lang="scss">
.rq .auto /deep/ .el-form-item__content{
height: auto;
line-height: 1.5;
}
</style>

8
src/views/modules/srmSupplier/com_supplierShare_supplierList.vue

@ -132,8 +132,8 @@ export default {
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '811031Table1SupplierNo',
tableId: "811031Table1",
serialNumber: '811031Table2SupplierNo',
tableId: "811031Table2",
tableName: "供应商信息",
columnProp: "supplierNo",
headerAlign: "center",
@ -150,8 +150,8 @@ export default {
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '811031Table1SupplierName',
tableId: "811031Table1",
serialNumber: '811031Table2SupplierName',
tableId: "811031Table2",
tableName: "供应商信息",
columnProp: "supplierName",
headerAlign: "center",

20
src/views/modules/srmSupplier/supplierShare.vue

@ -83,8 +83,8 @@
<el-tab-pane label="Approved Vendor List" name="vendorList" style="">
<vendorList ref="vendorList"></vendorList>
</el-tab-pane>
<el-tab-pane label="Documents" name="documents" style="">
<documents ref="documents"></documents>
<el-tab-pane label="Share" name="share" style="">
<share ref="share"></share>
</el-tab-pane>
</el-tabs>
@ -103,8 +103,7 @@ import {
import excel from "@/utils/excel-util.js";
import Chooselist from '@/views/modules/common/Chooselist_eam'
import vendorList from './com_supplierShare_supplierList'
import share from './com_srmSupplier_share'
import documents from './com_srmSupplier_DocumentDefinition'
import share from './com_supplierShare_share'
import {deleteMaterialFamily, saveOrUpdateFamily} from '../../../api/srm/srmSupplier'
export default {
data() {
@ -128,7 +127,7 @@ export default {
tagNo:'',
mainDataList:[],
dataListLoading: false,
activeName: 'vendorList',
activeName: 'share',
columnArray1: [
{
userId: this.$store.state.user.name,
@ -174,7 +173,7 @@ export default {
/*组件*/
components: {
Chooselist,
documents,
share,
vendorList,
},
@ -273,6 +272,15 @@ export default {
}
this.$refs.vendorList.init(inData)
},
refreshShareTable(){
let inData={
site: this.currentRow.site,
materialFamilyNo: this.currentRow.materialFamilyNo,
materialFamilyDesc: this.currentRow.materialFamilyDesc,
height:Number(this.height)-30
}
this.$refs.share.init(inData)
},
openModelData(){
this.addModelData={
flag: 0,

Loading…
Cancel
Save