1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396 |
- <!-- 供应商维护 -->
- <template>
- <div class="container">
- <Form :label-width="80" inline>
- <FormItem label="关键词">
- <Poptip trigger="focus" width="250" placement="bottom">
- <div slot="content">
- <ul style="" class="commons-select-search">
- <li :key="i.id" v-for="i in supplierList" @click="params.search = i.name">
- {{i.name}}
- </li>
- </ul>
- </div>
- <Input style="width:150px" v-model="params.search" @on-change="getSupplierSelectList" placeholder="请输入用途关键词"></Input>
- </Poptip>
-
- </FormItem>
- <Form-item label="按产品查看">
- <Select
- v-model="params.PurposeIndex"
- style="width: 150px"
- @on-change="selectPurposeFn"
- filterable
- >
- <div slot="empty">无匹配数据</div>
- <Option value="">全部</Option>
- <Option
- v-for="(i, index) in selectPurposeList"
- :value="i"
- :key="index"
- >{{ i }}</Option
- >
- </Select>
- </Form-item>
- <FormItem label="按账期查看">
- <Select v-model="params.accountDate" style="width:150px" >
- <div slot="empty">无匹配数据</div>
- <Option value="">全部</Option>
- <Option v-for="(i,index) in accountDateList" :value="i.value" :key="index">
- {{ i.label }}
- </Option>
- </Select>
- </FormItem>
- <FormItem label="按采购周期">
- <Select v-model="params.type" style="width:150px">
- <div slot="empty">无匹配数据</div>
- <Option value="">全部</Option>
- <Option v-for="(i,index) in safetyWarnDayList" :value="i.value" :key="index">
- {{ i.label }}
- </Option>
- </Select>
- </FormItem>
- <Button type="primary" @click="getStatisticsClassify();changePage(1)">查询</Button>
- <div style="float:right">
- <Button type="primary" style="margin-right:10px" @click="eventHandle('account')">收款账号维护</Button>
- <Button type="primary" style="margin-right:10px" @click="eventHandle('priceHandle')">价格维护</Button>
- <Button type="primary" @click="eventHandle('add')">添加</Button>
- </div>
- </Form>
- <div class="tabs-warp">
- <div
- @click="params.type = i.value;changePage(1);"
- :class="params.type == i.value ? 'active' : ''"
- v-for="i in statisticsClassifyData"
- :key="i.value">
- {{i.label}}
- </div>
- </div>
- <my-table :calcHeight="110" :data="data" :columns="columns" :table-page="params" @event-handle="eventHandle" @on-change="changePage"></my-table>
- <my-modal-form
- v-model="show"
- :title="title"
- :isMaterial="true"
- width="800px"
- :config="formType === 'add'? formConfig: formType === 'edit'? editFormConfig : showFormConfig"
- :rule-validate="ruleValidate"
- :data="formData"
- :type="formType"
- @confirm="cfm">
- </my-modal-form>
- <provider-account-form v-model="accountShow"></provider-account-form>
- <Modal
- v-model="accountDateRemarkModal"
- title="采购周期"
- >
- <Table :data="accountDateRemarkModalData" :columns="accountDateRemarkModalcolumns"></Table>
- </Modal>
- </div>
- </template>
- <script>
- import { GetFactoryPageList, FactoryAdd, FactoryUpdate, FactoryDelete, GetMaterialCategoryZTree } from '@/api/baseData'
- import { GetUserPageList } from '@/api/user'
- import MyTable from '_c/my-table/my-table2'
- import MyModalForm from '_c/my-modal-form/my-modal-form'
- import ProviderAccountForm from './provider-account-form'
- import axios from 'axios'
- import dun from '@/assets/images/dun.png'
- import renderListimgs from '_c/my-table/renderListimgs'
- export default {
- name: 'provider_maintenance',
- components: {
- MyTable,
- MyModalForm,
- ProviderAccountForm,
- renderListimgs
- },
- data () {
- const v = this
- return {
- dun:dun,
- technologyTypeList:['直喷','热转','打纸','墨水','其他','全部'],
- statisticsClassifyData:[],
- title: '',
- show: false,
- accountShow: false,
- supplierList:[],
- data: [],
- deleteId: '',
- formType: '',
- formData: {
- certificate:null,
- businessLicense:null,
- },
- ruleValidate: {
-
- // categoryCode: [
- // { required: true, message: '物料类型不能为空', trigger: 'blur' }
- // ],
- // name: [
- // { required: true, message: '供应商名称不能为空', trigger: 'blur' }
- // ],
- // accountDate: [
- // { required: true, message: '账期不能为空', trigger: 'blur' }
- // ],
-
- },
- formConfig: [
- {
- type: 'input',
- label: '供应商代码',
- key: 'code',
- disabled: true,
- placeholder: '系统自动生成',
- span: 12
- },
- // {
- // type: 'selectSearch',
- // label: '绑定用户',
- // key: 'bingdUserID',
- // list: [],
- // placeholder: '请输入绑定用户',
- // span: 12
- // },
- {
- type: 'input',
- label: '登录账户',
- key: 'bindUserAccount',
- placeholder: '请输入登录账户',
- span: 12
- },
- {
- type: 'selectSearch',
- label: '物料类型',
- key: 'materialClassifyId',
- list: [],
- placeholder: '请选择物料类型',
- span: 12
- },
- {
- type: 'upload',
- label: '供应商名称',
- text: '上传营业执照',
- key: 'name'
- },
- {
- type: 'input',
- label: '账期',
- key: 'accountDate',
- placeholder: '请输入账期',
- span: 12
- },
-
- {
- type: 'input',
- label: '账期说明',
- key: 'accountDateRemark',
- placeholder: '请输入账期说明',
- span: 12
- },
- {
- type: 'upload-flie',
- label: '营业执照',
- text: '上传营业执照',
- key: 'businessLicense',
- },
- {
- type: 'upload-flie',
- label: 'ca65',
- text: '加州65号法令合规测试证书',
- key: 'certificate'
- },
- {
- type: 'input',
- comType: 'textarea',
- label: '备注',
- key: 'remark',
- placeholder: '请输入仓库说明'
- },
- {
- type: 'tabs',
- hiddenLabel: true,
- tabs: [
- {
- title: '工商信息',
- forms: [
- {
- type: 'input',
- label: '法定代表人',
- key: 'legalPerson',
- placeholder: '请输入法定代表人',
- span: 12
- },
- {
- type: 'input',
- label: '社会信用代码',
- key: 'societyCreditCode',
- placeholder: '请输入社会信用代码',
- span: 12
- },
- {
- type: 'input',
- label: '注册地址',
- key: 'registeredAddress',
- placeholder: '请输入注册地址'
- },
- {
- type: 'input',
- label: '成立日期',
- key: 'establishDate',
- placeholder: '请输入成立日期',
- span: 12
- },
- {
- type: 'input',
- label: '注册资本',
- key: 'registeredCapital',
- placeholder: '请输入注册资本',
- span: 12
- },
- {
- type: 'input',
- label: '企业类型',
- key: 'enterpriseType',
- placeholder: '请输入企业类型',
- span: 12
- },
- {
- type: 'input',
- label: '营业期限',
- key: 'businessTerm',
- placeholder: '请输入营业期限',
- span: 12
- },
- {
- type: 'input',
- comType: 'textarea',
- label: '营业范围',
- key: 'businessScope',
- placeholder: '请输入营业范围'
- }
- ]
- },
- {
- title: '联系信息',
- forms: [
- {
- type: 'input',
- label: '联系人',
- key: 'linkMen',
- placeholder: '请输入联系人',
- span: 12
- },
- {
- type: 'input',
- label: '手机号码',
- key: 'mobile',
- placeholder: '请输入手机号码',
- span: 12
- },
- {
- type: 'input',
- label: '固定电话',
- key: 'telephone',
- placeholder: '请输入固定电话',
- span: 12
- },
- {
- type: 'input',
- label: '电子邮箱',
- key: 'email',
- placeholder: '请输入电子邮箱',
- span: 12
- },
- {
- type: 'input',
- label: '传真',
- key: 'fax',
- placeholder: '请输入传真',
- span: 12
- }
- ]
- },
- {
- title: '账户信息',
- forms: [
- {
- type: 'input',
- label: '对公户名',
- key: 'accountName',
- placeholder: '请输入对公户名',
- span: 12
- },
- {
- type: 'input',
- label: '开户银行',
- key: 'openBank',
- placeholder: '请输入开户银行',
- span: 12
- },
- {
- type: 'input',
- label: '对公账号',
- key: 'bankAccout',
- placeholder: '请输入对公账号',
- span: 12
- },
- {
- type: '',
- hiddenLabel: true
- },
- {
- type: 'input',
- label: '对私户名',
- key: 'privateAccountName',
- placeholder: '请输入对私户名',
- span: 12
- },
- {
- type: 'input',
- label: '开户银行',
- key: 'privateOpenBank',
- placeholder: '请输入开户银行',
- span: 12
- },
- {
- type: 'input',
- label: '对私账号',
- key: 'privateBankAccount',
- placeholder: '请输入对私账号',
- span: 12
- }
- ]
- },
- {
- title: '维护记录',
- type: 'picList',
- key: 'supplierKeepList'
- },
- {
- title: '其他资质',
- type: 'quaList',
- key: 'otherQualifications'
- }
- ]
- }
- ],
- editFormConfig: [
- {
- type: 'input',
- label: '供应商代码',
- key: 'code',
- placeholder: '请输入供应商代码',
- span: 12
- },
- // {
- // type: 'selectSearch',
- // label: '绑定用户',
- // key: 'bingdUserID',
- // list: [],
- // placeholder: '请输入绑定用户',
- // span: 12
- // },
- {
- type: 'input',
- label: '登录账户',
- disabled: true,
- key: 'userAccount',
- placeholder: '请输入登录账户',
- span: 12
- },
- {
- type: 'selectSearch',
- label: '物料类型',
- key: 'categoryCode',
- list: [],
- placeholder: '请选择物料类型',
- span: 12
- },
- {
- type: 'upload',
- label: '供应商名称',
- text: '上传营业执照',
- key: 'name'
- },
- {
- type: 'input',
- label: '账期',
- key: 'accountDate',
- placeholder: '请输入账期',
- span: 12
- },
- {
- type: 'input',
- label: '账期说明',
- key: 'accountDateRemark',
- placeholder: '请输入账期说明',
- span: 12
- },
- {
- type: 'upload-flie',
- label: '营业执照',
- text: '上传营业执照',
- key: 'businessLicense',
- },
- {
- type: 'upload-flie',
- label: 'ca65',
- text: '加州65号法令合规测试证书',
- key: 'certificate'
- },
- {
- type: 'input',
- comType: 'textarea',
- label: '备注',
- key: 'remark',
- placeholder: '请输入仓库说明'
- },
- {
- type: 'tabs',
- hiddenLabel: true,
- tabs: [
- {
- title: '工商信息',
- forms: [
- {
- type: 'input',
- label: '法定代表人',
- key: 'legalPerson',
- placeholder: '请输入法定代表人',
- span: 12
- },
- {
- type: 'input',
- label: '社会信用代码',
- key: 'societyCreditCode',
- placeholder: '请输入社会信用代码',
- span: 12
- },
- {
- type: 'input',
- label: '注册地址',
- key: 'registeredAddress',
- placeholder: '请输入注册地址'
- },
- {
- type: 'input',
- label: '成立日期',
- key: 'establishDate',
- placeholder: '请输入成立日期',
- span: 12
- },
- {
- type: 'input',
- label: '注册资本',
- key: 'registeredCapital',
- placeholder: '请输入注册资本',
- span: 12
- },
- {
- type: 'input',
- label: '企业类型',
- key: 'enterpriseType',
- placeholder: '请输入企业类型',
- span: 12
- },
- {
- type: 'input',
- label: '营业期限',
- disabled: true,
- key: 'businessTerm',
- placeholder: '请输入营业期限',
- span: 12
- },
- {
- type: 'input',
- comType: 'textarea',
- label: '营业范围',
- key: 'businessScope',
- placeholder: '请输入营业范围'
- }
- ]
- },
- {
- title: '联系信息',
- forms: [
- {
- type: 'input',
- label: '联系人',
- key: 'linkMen',
- placeholder: '请输入联系人',
- span: 12
- },
- {
- type: 'input',
- label: '手机号码',
- key: 'mobile',
- placeholder: '请输入手机号码',
- span: 12
- },
- {
- type: 'input',
- label: '固定电话',
- key: 'telephone',
- placeholder: '请输入固定电话',
- span: 12
- },
- {
- type: 'input',
- label: '电子邮箱',
- key: 'email',
- placeholder: '请输入电子邮箱',
- span: 12
- },
- {
- type: 'input',
- label: '传真',
- key: 'fax',
- placeholder: '请输入传真',
- span: 12
- }
- ]
- },
- {
- title: '账户信息',
- forms: [
- {
- type: 'input',
- label: '对公户名',
- key: 'accountName',
- placeholder: '请输入对公户名',
- span: 12
- },
- {
- type: 'input',
- label: '开户银行',
- key: 'openBank',
- placeholder: '请输入开户银行',
- span: 12
- },
- {
- type: 'input',
- label: '对公账号',
- key: 'bankAccout',
- placeholder: '请输入对公账号',
- span: 12
- },
- {
- type: '',
- hiddenLabel: true
- },
- {
- type: 'input',
- label: '对私户名',
- key: 'privateAccountName',
- placeholder: '请输入对私户名',
- span: 12
- },
- {
- type: 'input',
- label: '开户银行',
- key: 'privateOpenBank',
- placeholder: '请输入开户银行',
- span: 12
- },
- {
- type: 'input',
- label: '对私账号',
- key: 'privateBankAccount',
- placeholder: '请输入对私账号',
- span: 12
- }
- ]
- },
- {
- title: '维护记录',
- type: 'picList',
- key: 'facPicList'
- },
- {
- title: '主营价格',
- type: 'material'
- },
- {
- title: '采购分析',
- type: 'charts'
- },
- {
- title: '维护记录',
- type: 'picList',
- key: 'facPicList'
- },
- {
- title: '其他资质',
- type: 'quaList',
- key: 'facquaList'
- }
-
- ]
- },
- ],
- showFormConfig: [
- {
- type: 'input',
- label: '供应商代码',
- disabled: true,
- key: 'code',
- placeholder: '请输入供应商代码',
- span: 12
- },
- // {
- // type: 'selectSearch',
- // label: '绑定用户',
- // disabled: true,
- // key: 'bingdUserID',
- // list: [],
- // placeholder: '请输入绑定用户',
- // span: 12
- // },
- {
- type: 'input',
- label: '登录账户',
- disabled: true,
- key: 'userAccount',
- placeholder: '请输入登录账户',
- span: 12
- },
- {
- type: 'selectSearch',
- label: '物料类型',
- key: 'categoryCode',
- disabled: true,
- list: [],
- placeholder: '请选择物料类型',
- span: 12
- },
- {
- type: 'upload',
- label: '供应商名称',
- disabled: true,
- text: '上传营业执照',
- key: 'name'
- },
- {
- type: 'input',
- label: '账期',
- disabled: true,
- key: 'accountDate',
- placeholder: '请输入账期',
- span: 12
- },
- {
- type: 'input',
- label: '账期说明',
- disabled: true,
- key: 'accountDateRemark',
- placeholder: '请输入账期说明',
- span: 12
- },
- {
- type: 'upload-flie',
- label: '营业执照',
- text: '上传营业执照',
- key: 'businessLicense',
- },
- {
- type: 'upload-flie',
- label: 'ca65',
- text: '加州65号法令合规测试证书',
- key: 'certificate'
- },
- {
- type: 'input',
- comType: 'textarea',
- label: '备注',
- disabled: true,
- key: 'remark',
- placeholder: '请输入仓库说明'
- },
- {
- type: 'tabs',
- hiddenLabel: true,
- tabs: [
- {
- title: '工商信息',
- forms: [
- {
- type: 'input',
- label: '法定代表人',
- disabled: true,
- key: 'legalPerson',
- placeholder: '请输入法定代表人',
- span: 12
- },
- {
- type: 'input',
- label: '社会信用代码',
- disabled: true,
- key: 'societyCreditCode',
- placeholder: '请输入社会信用代码',
- span: 12
- },
- {
- type: 'input',
- label: '注册地址',
- disabled: true,
- key: 'registeredAddress',
- placeholder: '请输入注册地址'
- },
- {
- type: 'input',
- label: '成立日期',
- disabled: true,
- key: 'establishDate',
- placeholder: '请输入成立日期',
- span: 12
- },
- {
- type: 'input',
- label: '注册资本',
- disabled: true,
- key: 'registeredCapital',
- placeholder: '请输入注册资本',
- span: 12
- },
- {
- type: 'input',
- label: '企业类型',
- disabled: true,
- key: 'enterpriseType',
- placeholder: '请输入企业类型',
- span: 12
- },
- {
- type: 'input',
- label: '营业期限',
- disabled: true,
- key: 'businessTerm',
- placeholder: '请输入营业期限',
- span: 12
- },
- {
- type: 'input',
- comType: 'textarea',
- label: '营业范围',
- disabled: true,
- key: 'businessScope',
- placeholder: '请输入营业范围'
- }
- ]
- },
- {
- title: '联系信息',
- forms: [
- {
- type: 'input',
- label: '联系人',
- disabled: true,
- key: 'linkMen',
- placeholder: '请输入联系人',
- span: 12
- },
- {
- type: 'input',
- label: '手机号码',
- disabled: true,
- key: 'mobile',
- placeholder: '请输入手机号码',
- span: 12
- },
- {
- type: 'input',
- label: '固定电话',
- disabled: true,
- key: 'telephone',
- placeholder: '请输入固定电话',
- span: 12
- },
- {
- type: 'input',
- label: '电子邮箱',
- disabled: true,
- key: 'email',
- placeholder: '请输入电子邮箱',
- span: 12
- },
- {
- type: 'input',
- label: '传真',
- disabled: true,
- key: 'fax',
- placeholder: '请输入传真',
- span: 12
- }
- ]
- },
- {
- title: '账户信息',
- forms: [
- {
- type: 'input',
- label: '对公户名',
- disabled: true,
- key: 'accountName',
- placeholder: '请输入对公户名',
- span: 12
- },
- {
- type: 'input',
- label: '开户银行',
- disabled: true,
- key: 'openBank',
- placeholder: '请输入开户银行',
- span: 12
- },
- {
- type: 'input',
- label: '对公账号',
- disabled: true,
- key: 'bankAccout',
- placeholder: '请输入对公账号',
- span: 12
- },
- {
- type: '',
- hiddenLabel: true
- },
- {
- type: 'input',
- label: '对私户名',
- disabled: true,
- key: 'privateAccountName',
- placeholder: '请输入对私户名',
- span: 12
- },
- {
- type: 'input',
- label: '开户银行',
- disabled: true,
- key: 'privateOpenBank',
- placeholder: '请输入开户银行',
- span: 12
- },
- {
- type: 'input',
- label: '对私账号',
- disabled: true,
- key: 'privateBankAccount',
- placeholder: '请输入对私账号',
- span: 12
- }
- ]
- },
- {
- title: '维护记录',
- type: 'picList',
- key: 'facPicList'
- },
- {
- title: '主营价格',
- type: 'material'
- },
- {
- title: '采购分析',
- type: 'charts'
- },
- {
- title: '其他资质',
- type: 'quaList',
- key: 'facquaList'
- }
- ]
- }
- ],
- columns: [
- {
- title: '序号',
- type: 'index',
- width: 60,
- align: 'center'
- },
- {
- title: '供应商代码',
- key: 'supplierCoded',
- minWidth: 100
- },
- {
- title: '供应商名称',
- key: 'supplierName',
- minWidth: 300,
- render(h,p){
- return h(renderListimgs,{
- props: {
- row: p.row
- }
- })
- },
- },
- {
- title: '物料类型',
- key: 'malssifyName',
- minWidth: 150
- },
- {
- title: '账期',
- key: 'accountDate',
- minWidth: 100
- },
- {
- title: '采购周期',
- key: 'accountDateRemark',
- minWidth: 100,
- render:(h,p)=>{
- return h('span',{
- style:{
- color:'#0077ff',
- cursor:"pointer"
- },
- on: {
- click: () => {
- axios.post('/api/storage-restructure/supplier/getSafetyWarnDayBySupplier',{supplierId:p.row.id}).then(res=>{
- this.accountDateRemarkModalData = res.data.data
- this.accountDateRemarkModal = true
- })
-
-
- }
- }
- },
- '查看'
- )
- }
- },
- {
- title: '账期说明',
- key: 'accountDateRemark',
- minWidth: 100
- },
- {
- title: '联系人',
- key: 'linkMen',
- minWidth: 100
- },
- {
- title: '联系电话',
- key: 'telephone',
- minWidth: 150
- },
- {
- title: '操作',
- key: 'action',
- align: 'center',
- fixed: 'right',
- width: 150,
- render: (h, params) => {
- return h('div', [
- h(
- 'Icon',
- {
- props: {
- custom: 'iconfont icon-chakan',
- size: '20',
- color: '#6bc01e'
- },
- style: {
- marginRight: '20px'
- },
- on: {
- click: () => {
- this.show = true
- axios.get('/cloudApi/supplier/detail?id=' + params.row.id,{}).then(res=>{
- this.formData = res.data.data
- this.formType = 'form'
- this.title = '供应商详情'
- this.show = true
- })
- }
- }
- },
- '查看明细'
- ),
- h(
- 'Icon',
- {
- props: {
- custom: 'iconfont icon-edit',
- size: '20',
- color: '#087BE1'
- },
- style: {
- marginRight: '20px'
- },
- on: {
- click: () => {
-
- this.$post('/api/storage-restructure/supplier/details',{id:params.row.id}).then(res=>{
- this.formData = res.data
-
- this.formType = 'edit'
- this.title = '修改'
- this.show = true
- })
- }
- }
- },
- '修改'
- ),
- h(
- 'Icon',
- {
- props: {
- custom: 'iconfont icon-delete',
- size: '20',
- color: 'red'
- },
- on: {
- click: () => {
- this.$MyModal.show({ text: '是否删除?' }).$on('confirm', () => {
- axios.post('/cloudApi/supplier/delete',{id:params.row.id}).then(res=>{
- if (res.data.code == 200) {
- v.$Message.info(res.data.msg)
- v.getList()
- }
- })
- })
- }
- }
- },
- '删除'
- )
- ])
- }
- }
- ],
- accountDateRemarkModalcolumns:[
- {
- title: '序号',
- type: 'index',
- width: 60,
- align: 'center'
- },
- {
- title: '物料编码',
- key: 'materialCode'
- },
- {
- title: '面料名称',
- key: 'materialName'
- },
- {
- title: '采购周期',
- key: 'safetyWarnDay'
- },
- ],
- accountDateRemarkModalData:[],
- accountDateRemarkModal:false,
- tableFilter: [
- {
- name: 'Input',
- value: 'key',
- placeholder: '请输入关键字'
- },
- {
- name: 'Button',
- type: 'primary',
- text: '查询',
- e: 'search'
- },
- {
- name: 'Button',
- type: 'primary',
- text: '添加',
- align: 'right',
- e: 'add'
- },
- {
- name: 'Button',
- type: 'primary',
- text: '价格维护',
- align: 'right',
- e: 'priceHandle'
- },
- {
- name: 'Button',
- type: 'primary',
- text: '收款账号维护',
- align: 'right',
- width: '300',
- e: 'account'
- }
- ],
- params: {
- pageNum: 1,
- pageSize: 10,
- total: 0,
- TechnologyType:99,
- Purpose:null,
- search:null,
- },
- total:0,
- loading:false,
- selectPurposeList:[],
- accountDateList:[],
- safetyWarnDayList:[],
- }
- },
- methods: {
- getSafetyWarnDayList(){
- const v = this
- this.$post('/api/storage-restructure/supplier/getSafetyWarnDay',{}).then(res=>{
- console.log(res)
- v.safetyWarnDayList = res.data
- })
-
- },
- getAccountDateList(){
- const v = this
- this.$post('/api/storage-restructure/supplier/getAccountDate',{}).then(res=>{
- console.log(res)
- v.accountDateList = res.data
- })
-
- },
-
- selectPurposeFn(e){
- console.log(e)
- if(e == 999){
- this.params.Purpose = ''
- }else{
- this.params.Purpose = this.selectPurposeList[e].purpose
- }
-
- },
- cfm (type, formData) {
- if (type === 'add') {
- const formDataCopy = {
- ...formData,
- supplierBank:{
- accountName:formData.accountName,
- openBank:formData.openBank,
- bankAccount:formData.bankAccount,
- privateAccountName:formData.privateAccountName,
- privateOpenBank:formData.privateOpenBank,
- privateBankAccount:formData.privateBankAccount,
- },
- supplierContacts:{
- linkMen:formData.linkMen,
- mobile:formData.mobile,
- telephone:formData.telephone,
- email:formData.email,
- fax:formData.fax,
- },
- supplierKeepList:[],
- otherQualifications:[],
- }
- this.$post('/api/storage-restructure/supplier/add',formDataCopy).then(res=>{
- this.show = false
- this.$Message.info(res.data.msg)
- if(res.code === 200){
- this.show = false
- this.$Message.info(res.msg)
- this.getList()
- }
- })
- } else if (type === 'edit') {
-
- axios.post('/cloudApi/supplier/edit',formData).then(res=>{
- this.show = false
- this.$Message.info(res.data.msg)
- this.getList()
- })
-
- }
- },
- // 检索条件事件处理
- eventHandle (option) {
- switch (option) {
- case 'search':
- console.log(option)
- this.params.pageNum = 1
- this.params.search = option.key
- this.getList()
- break
- case 'add':
- this.formType = 'add'
- this.title = '添加供应商'
- this.show = true
- break
- case 'priceHandle':
- this.$router.push({
- name: 'provider_price_maintenance'
- })
- break
- case 'account':
- this.accountShow = true
- break
- }
- },
- changePage (pageNum) {
- this.params.pageNum = pageNum
- this.getList()
- },
- getMaterialCategoryZTree () {
- this
- .$post(
- '/api/storage-restructure/materialClassify/tree')
- .then((res) => {
- for (let i = 0; i < res.data.length; i++) {
- const element = res.data[i];
- element.label = element.name
- element.value = element.id
- }
-
- console.log(res.data)
- this.formConfig[2].list = res.data
- this.editFormConfig[2].list = res.data
- this.showFormConfig[2].list = res.data
- })
-
- },
- getUserPageList () {
- GetUserPageList({
- pageNum: 1,
- pageSize: 9999
- }).then(res => {
- if (res.code === 0) {
- let list = res.result.list.map(item => {
- return {
- label: item.realName,
- value: item.id
- }
- })
- this.formConfig[1].list = list
- this.editFormConfig[1].list = list
- this.showFormConfig[1].list = list
- }
- })
- },
- getList () {
- this.$post('/api/storage-restructure/supplier/page', {...this.params})
- .then((res) => {
- this.data = res.data.records
- this.params.total = res.data.total
- })
- // GetFactoryPageList(this.params).then(res => {
- // if (res.code === 0) {
- // this.data = res.result.list
- // this.params.total = res.result.totalCount
- // }
- // })
- },
- getMaterialSelectPurposeList(){
- const v = this
- v.loading = true
- v.$post('/api/storage-restructure/material/getPurpose', {})
- .then((res) => {
-
- v.selectPurposeList = res.data
- v.loading = false
- })
- },
- getSupplierSelectList(req){
- const v = this
- v.loading = true
- axios
- .post('/cloudApi/supplier/selectList', {search:this.params.search})
- .then((res) => {
- v.supplierList = res.data.data
- v.loading = false
- console.log(v.supplierList)
- })
- },
- getStatisticsClassify(){
- this
- .$post(
- '/api/storage-restructure/supplier/getStatistics',this.params)
- .then((res) => {
-
- this.statisticsClassifyData = res.data
-
- })
- },
- //获取物料类型树
- socketInit(){
- var ws = new WebSocket("ws://36.134.91.96:10001/api/storage-restructure/webStock/123123");
- //申请一个WebSocket对象,参数是服务端地址,同http协议使用http://开头一样,WebSocket协议的url使用ws://开头,另外安全的WebSocket协议使用wss://开头
- ws.onopen = function(){
- //当WebSocket创建成功时,触发onopen事件
- console.log("open");
- ws.send("hello"); //将消息发送到服务端
- }
- ws.onmessage = function(e){
- //当客户端收到服务端发来的消息时,触发onmessage事件,参数e.data包含server传递过来的数据
- console.log(e.data,'1111111111111111111111111111')
- var msg = JSON.parse(e.data)
- if(msg.type == 1){
-
- msg.data.instructions = 'test'
- msg.data.type = '2'
- msg.type = '2'
- ws.send(JSON.stringify(msg));
- }
-
-
- }
- ws.onclose = function(e){
- //当客户端收到服务端发送的关闭连接请求时,触发onclose事件
- console.log("close");
- }
- ws.onerror = function(e){
- //如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
- console.log(error);
- }
- },
-
- },
- mounted () {
- this.getList()
- // this.getUserPageList()
- this.getMaterialCategoryZTree()
- this.getStatisticsClassify()
- // this.getSupplierSelectList()
- this.getMaterialSelectPurposeList()
- this.getAccountDateList()
- this.getSafetyWarnDayList()
- //this.socketInit()
- }
- }
- </script>
- <style lang="less" scoped>
- .container {
-
- .tabs-warp{
- height: 60px;
- line-height: 60px;
- border-bottom: 1px solid #979797;
- margin-bottom: 10px;
- display: flex;
-
- div{
- width: 20%;
- font-size: 16px;
- text-align: center;
- position: relative;
- cursor: pointer;
- span{
- color:#EF0000
- }
- }
- div.active::before{
- position: absolute;
- content:" ";
- left: 0;
- right:0;
- bottom:0;
- height:4px;
- background: #1A3AF0;
- }
- }
- }
- </style>
|