Commit bcff8e59 authored by daywrite's avatar daywrite

修复供应商管理

parent 9e67dcf8
...@@ -11,4 +11,24 @@ ...@@ -11,4 +11,24 @@
border-color: #dc3545; border-color: #dc3545;
color: #dc3545; color: #dc3545;
} }
.el-dialog__title {
color:white;
}
.ec-page-wrapper .el-form-item__label {
color: white;
}
.el-button--cancel {
color:white;
background-color: #EB7567;
border-color: #e86150;
}
.el-button--confirm {
color:white;
background-color:#649FD7;
border-color:#5092d2;
}
} }
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
v-click-outside="lmClose" v-click-outside="lmClose"
ref="leaveMessage" ref="leaveMessage"
:lmTemplate="lmTemplate" :lmTemplate="lmTemplate"
:type="9"> :type="18">
</leave-message> </leave-message>
</div> </div>
</div> </div>
...@@ -140,32 +140,32 @@ export default { ...@@ -140,32 +140,32 @@ export default {
default: '未设置' default: '未设置'
}, },
{ {
name: '内容', name: 'Case类型',
value: 'description' value: 'case_type_display'
}, },
{ {
name: '待办时间', name: 'Case状态',
value: 'schedule_week_display' value: 'case_status_display'
}, },
{ {
name: '状态', name: '服务目录',
value: 'schedule_status_display' value: 'services.name'
}, },
{ {
name: '开始时间', name: '工分',
value: 'start_at' value: 'points'
}, },
{ {
name: '结束时间', name: '开始时间',
value: 'end_at' value: 'start_at'
}, },
{ {
name: '重复', name: '关单时间',
value: 'repeat_type_display' value: 'start_at'
}, },
{ {
name: '负责人', name: '录入人',
value: 'scheduleCreator.name' value: 'createdBy.name'
}, },
{ {
name: '创建时间', name: '创建时间',
......
...@@ -119,6 +119,7 @@ export default { ...@@ -119,6 +119,7 @@ export default {
let ret = this.getArrayByKey('Services', 'type_id') let ret = this.getArrayByKey('Services', 'type_id')
return ret && [].concat(ret.value) return ret && [].concat(ret.value)
} }
// company_nature
}, },
methods: { methods: {
...@@ -146,6 +147,21 @@ export default { ...@@ -146,6 +147,21 @@ export default {
return methods[params].call(this, id) return methods[params].call(this, id)
}, },
getSupplierNew () {
requestAPI(api.getsupplierNew)
.then((res) => {
this.retNewArray = res.options
})
},
getSupplierEdit (id) {
return requestAPI(api.getsupplierEdit, { id })
.then((res) => {
this.retNewArray = res.options
return res.model
})
},
getPunchEdit (id) { getPunchEdit (id) {
return requestAPI(api.getpunchEdit, { id }) return requestAPI(api.getpunchEdit, { id })
.then((res) => { .then((res) => {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<el-form-item label="供应商名称" prop="name" class="ec-clear-left is-required"> <el-form-item label="供应商名称" prop="name" class="ec-clear-left is-required">
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
size="mini"
v-model.trim="model.name"> v-model.trim="model.name">
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -11,11 +12,12 @@ ...@@ -11,11 +12,12 @@
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
type="textarea" type="textarea"
size="mini"
:rows="3" :rows="3"
v-model.trim="model.main_products"> v-model.trim="model.main_products">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="公司性质:" prop="company_nature" class="ec-clear-left ec-form-item-lg is-required"> <el-form-item label="公司性质:" prop="company_nature" size="mini" class="ec-clear-left ec-form-item-lg is-required">
<el-select v-model="model.company_nature" size="small" placeholder="请选择"> <el-select v-model="model.company_nature" size="small" placeholder="请选择">
<el-option v-for="(option, optKey) in caseSpentTimeArray" <el-option v-for="(option, optKey) in caseSpentTimeArray"
:key="optKey" :key="optKey"
...@@ -33,13 +35,14 @@ ...@@ -33,13 +35,14 @@
<el-form-item label="公司网址:" prop="website" class="ec-clear-left"> <el-form-item label="公司网址:" prop="website" class="ec-clear-left">
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
size="mini"
v-model.trim="model.website"> v-model.trim="model.website">
<template slot="prepend">Http://</template> <template slot="prepend">Http://</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="成立时间:" prop="established_at" class="ec-clear-left"> <el-form-item label="成立时间:" prop="established_at" class="ec-clear-left">
<el-date-picker <el-date-picker
size="small" size="mini"
v-model="model.established_at" v-model="model.established_at"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -50,6 +53,7 @@ ...@@ -50,6 +53,7 @@
<el-form-item label="注册资金:" prop="capital" class="ec-clear-left"> <el-form-item label="注册资金:" prop="capital" class="ec-clear-left">
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
size="mini"
v-model.trim="model.capital"> v-model.trim="model.capital">
<el-select v-model="model.capital_currency" slot="prepend" placeholder="请选择"> <el-select v-model="model.capital_currency" slot="prepend" placeholder="请选择">
<el-option label="餐厅名" value="1"></el-option> <el-option label="餐厅名" value="1"></el-option>
...@@ -60,6 +64,7 @@ ...@@ -60,6 +64,7 @@
</el-form-item> </el-form-item>
<el-form-item label="法人代表:" prop="corp_rep" class="ec-clear-left"> <el-form-item label="法人代表:" prop="corp_rep" class="ec-clear-left">
<el-input <el-input
size="mini"
class="ec-input-normal" class="ec-input-normal"
v-model.trim="model.corp_rep"> v-model.trim="model.corp_rep">
</el-input> </el-input>
...@@ -67,12 +72,14 @@ ...@@ -67,12 +72,14 @@
<el-form-item label="付款周期:" prop="payment_cycle" class="ec-clear-left"> <el-form-item label="付款周期:" prop="payment_cycle" class="ec-clear-left">
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
size="mini"
v-model.trim="model.payment_cycle"> v-model.trim="model.payment_cycle">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="账号:" prop="account_number" class="ec-clear-left"> <el-form-item label="账号:" prop="account_number" class="ec-clear-left">
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
size="mini"
v-model.trim="model.account_number"> v-model.trim="model.account_number">
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -80,6 +87,7 @@ ...@@ -80,6 +87,7 @@
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
type="textarea" type="textarea"
size="mini"
:rows="3" :rows="3"
v-model.trim="model.address1"> v-model.trim="model.address1">
</el-input> </el-input>
...@@ -87,6 +95,7 @@ ...@@ -87,6 +95,7 @@
<el-form-item label="邮政编码:" prop="zip" class="ec-clear-left"> <el-form-item label="邮政编码:" prop="zip" class="ec-clear-left">
<el-input <el-input
class="ec-input-normal" class="ec-input-normal"
size="mini"
v-model.trim="model.zip"> v-model.trim="model.zip">
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -116,12 +125,8 @@ ...@@ -116,12 +125,8 @@
<script> <script>
import singleRadio from '../common/singleRadio' import singleRadio from '../common/singleRadio'
import settingMixin from '../common/settingMixin' import settingMixin from '../common/settingMixin'
import {
requestAPI,
api
} from '@/lib/commonMixin'
export default { export default {
name: 'documentForim', name: 'supplierForm',
mixins: [settingMixin], mixins: [settingMixin],
......
<template> <template>
<section> <section>
<sidePopup ref="sidePopup" title="新建供应商" :width="50" @update:close="() => btnClose()"> <sidePopup ref="sidePopup" title="新建供应商" :width="50" @update:close="() => btnClose()">
<CaseForm <SupplierForm
ref="form" ref="form"
:model="model"> :model="model">
</CaseForm> </SupplierForm>
<div class="mt20" style="margin-left: 150px;"> <div class="mt20" style="margin-left: 150px;">
<el-button type="cancel" @click.stop.prevent="handleClose" size="mini">取 消</el-button> <el-button type="cancel" @click.stop.prevent="handleClose" size="mini">取 消</el-button>
<el-button type="confirm" @click.stop.prevent="save" size="mini">确 定</el-button> <el-button type="confirm" @click.stop.prevent="save" size="mini">确 定</el-button>
...@@ -18,12 +18,12 @@ import { ...@@ -18,12 +18,12 @@ import {
api, api,
UTIL UTIL
} from '@/lib/commonMixin' } from '@/lib/commonMixin'
import CaseForm from './caseForm' import SupplierForm from './supplierForm'
import { setModule } from '@/lib/viewHelper' import { setModule } from '@/lib/viewHelper'
export default { export default {
components: { components: {
CaseForm SupplierForm
}, },
data () { data () {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
v-click-outside="lmClose" v-click-outside="lmClose"
ref="leaveMessage" ref="leaveMessage"
:lmTemplate="lmTemplate" :lmTemplate="lmTemplate"
:type="9"> :type="12">
</leave-message> </leave-message>
</div> </div>
</div> </div>
...@@ -66,8 +66,7 @@ ...@@ -66,8 +66,7 @@
import SearchHeader from '../common/searchHeader' import SearchHeader from '../common/searchHeader'
import SearchForm from '../common/SearchForm' import SearchForm from '../common/SearchForm'
import Item from './supplierItem' import Item from './supplierItem'
import FormModal from '../case/caseModal' import FormModal from '../supplier/supplierModal'
import LeaveMessage from '../common/leaveMessage'
import Pagenation from './supplierPagenation' import Pagenation from './supplierPagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
...@@ -86,7 +85,6 @@ export default { ...@@ -86,7 +85,6 @@ export default {
SearchForm, SearchForm,
Item, Item,
FormModal, FormModal,
LeaveMessage,
Pagenation, Pagenation,
singleRadioTool singleRadioTool
}, },
...@@ -100,37 +98,29 @@ export default { ...@@ -100,37 +98,29 @@ export default {
currKey: 'supplier', currKey: 'supplier',
lmTemplate: [ lmTemplate: [
{ {
name: '客户名称', name: '供应商名称',
value: 'client.name', value: 'name'
default: '未设置'
},
{
name: '内容',
value: 'description'
}, },
{ {
name: '待办时间', name: '供应商类型',
value: 'schedule_week_display' value: 'supplierTags.name',
}, default: '未设置'
{
name: '状态',
value: 'schedule_status_display'
}, },
{ {
name: '开始时间', name: '付款周期',
value: 'start_at' value: 'payment_cycle'
}, },
{ {
name: '结束时间', name: '主营产品',
value: 'end_at' value: 'main_products'
}, },
{ {
name: '重复', name: '备注',
value: 'repeat_type_display' value: 'description'
}, },
{ {
name: '负责人', name: '录入人',
value: 'scheduleCreator.name' value: 'createdBy.name'
}, },
{ {
name: '创建时间', name: '创建时间',
...@@ -259,7 +249,7 @@ export default { ...@@ -259,7 +249,7 @@ export default {
// 7.操作 // 7.操作
// 删除 // 删除
deleteSch (id) { deleteEvent (id) {
let deleteTip = '删除供应商' let deleteTip = '删除供应商'
this.$confirm(`${deleteTip}?`, '提示', { this.$confirm(`${deleteTip}?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -278,12 +268,12 @@ export default { ...@@ -278,12 +268,12 @@ export default {
// 8.留言 // 8.留言
leaveMessageSch (item) { leaveMessageSch (item) {
this.$refs.leaveMessage.isShow(item) this.$refs.leaveMessage.btnShow(item)
}, },
lmClose () { lmClose () {
this.$refs.leaveMessage && this.$refs.leaveMessage &&
this.$refs.leaveMessage.isClose() this.$refs.leaveMessage.btnClose()
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment