Commit bcff8e59 authored by daywrite's avatar daywrite

修复供应商管理

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