Browse Source

客户

master
蔡玲玲 3 weeks ago
parent
commit
90180b86bd
  1. 6
      base-vue/src/utils/lodop/LodopFuncs.js
  2. 18
      base-vue/src/views/modules/client/client-add-or-update.vue
  3. 2
      base-vue/src/views/modules/contract/contract.vue
  4. 30
      base-vue/src/views/modules/contract/temp-add-or-update.vue
  5. 85
      base-vue/src/views/modules/tickets/tickets-add-or-update.vue

6
base-vue/src/utils/lodop/LodopFuncs.js

@ -5,11 +5,11 @@ var head = document.head || document.getElementsByTagName('head')[0] || document
var oscript = document.createElement('script')
// 让本机的浏览器打印(更优先一点):
oscript = document.createElement('script')
oscript.src = 'http://192.168.10.54:8000/CLodopfuncs.js?priority=2'
oscript.src = 'http://192.168.10.30:8000/CLodopfuncs.js?priority=2'
head.insertBefore(oscript, head.firstChild)
// 加载双端口(8000和18000)避免其中某个端口被占用:
oscript = document.createElement('script')
oscript.src = 'http://192.168.10.54:18000/CLodopfuncs.js?priority=1'
oscript.src = 'http://192.168.10.30:18000/CLodopfuncs.js?priority=1'
head.insertBefore(oscript, head.firstChild)
// 下载loadLodop
@ -28,7 +28,7 @@ function getLodop() {
}
//设置打印版权
LODOP.SET_LICENSES('浙江省烟草专卖局(公司)', 'C0C4A46A3A0D1F526D426018D9F11921', '', '')
LODOP.SET_SHOW_MODE('SETUP_ENABLESS', '11111111100001')
LODOP.SET_SHOW_MODE('SETUP_ENABLESS', '10000000000000')
return LODOP
} catch (err) {
MessageBox({

18
base-vue/src/views/modules/client/client-add-or-update.vue

@ -17,10 +17,11 @@
<el-input v-model="dataForm.industry" placeholder="行业"></el-input>
</el-form-item>
<el-form-item label="是否启用" prop="isOn">
<el-input v-model="dataForm.isOn" placeholder="是否启用"></el-input>
</el-form-item>
<el-form-item label="创建日期" prop="createTime">
<el-input v-model="dataForm.createTime" placeholder="创建日期"></el-input>
<el-switch
v-model="dataForm.isOn"
active-color="#409EFF"
inactive-color="#F56C6C"
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -41,8 +42,7 @@
juridicalPerson: '',
address: '',
industry: '',
isOn: '',
createTime: ''
isOn: false
},
dataRule: {
clientName: [
@ -56,12 +56,6 @@
],
industry: [
{ required: true, message: '行业不能为空', trigger: 'blur' }
],
isOn: [
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
],
createTime: [
{ required: true, message: '创建日期不能为空', trigger: 'blur' }
]
}
}

2
base-vue/src/views/modules/contract/contract.vue

@ -143,7 +143,7 @@
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/tickets/contract/list'),
url: this.$http.adornUrl('/flow/contract/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,

30
base-vue/src/views/modules/contract/temp-add-or-update.vue

@ -15,14 +15,14 @@
<p class="tip_p">产品明细单</p>
<table class="det_table">
<tr>
<th width="50px">物料编号</th>
<th width="50px">物料名称</th>
<th width="50px">型号</th>
<th width="50px">数量</th>
<th width="50px">单位</th>
<th width="50px">单价</th>
<th width="50px">总价</th>
<th width="50px">备注</th>
<th width="20%">物料编号</th>
<th width="20%">物料名称</th>
<th width="10%">型号</th>
<th width="10%">数量</th>
<th width="10%">单位</th>
<th width="10%">单价</th>
<th width="10%">总价</th>
<th width="10%">备注</th>
</tr>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{ e.materialCode }}</td>
@ -87,7 +87,7 @@ export default {
data () {
return {
visible: false,
dataList: [{materialCode: 'S9410002000002'}]
dataList: [{materialCode: 'S9410002000002'}, {materialCode: 'S9410002000003'}]
}
},
methods: {
@ -99,15 +99,9 @@ export default {
//
addAndPrint () {
const LODOP = getLodop()
LODOP.PRINT_INIT("打印合同模板")
// A4
LODOP.PRINT_INITA("0mm", "0mm", "210mm", "297mm", "打印合同模板")
LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "A4")
LODOP.SET_SHOW_MODE("BKIMG_IN_PREVIEW", 1)
LODOP.SET_SHOW_MODE("SETUP_ENABLES", "11111111100001")
LODOP.ADD_PRINT_SETUP_BKIMG("./bg.jpg")
LODOP.ADD_PRINT_TEXT(0, 0, 700, 50, "产品供应合同")
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2); // 2
LODOP.SET_PRINT_STYLEA(0, "FontSize", 12); // 12
// HTML
const popupContent = document.getElementById('popupContent').innerHTML
const printHtml = `
@ -116,12 +110,12 @@ export default {
.zd-col-12 {width: 50%;}
.dialog_content {width: 100%;}
.det_table {width: 100%; border-collapse: collapse;border: 1px solid #000;}
.det_table th, .det_table td {border: 1px solid #000;font-size: 10px; line-height: 23px;}
.det_table th, .det_table td {border: 1px solid #000;font-size: 10px; line-height: 23px; padding: 0;}
</style>
${popupContent}
`
//
LODOP.ADD_PRINT_HTM(50, 50, "100%", "100%", printHtml)
LODOP.ADD_PRINT_HTM("0mm", "0mm", "RightMargin:0mm", "BottomMargin:0mm", printHtml)
LODOP.PREVIEW()//
},
}

85
base-vue/src/views/modules/tickets/tickets-add-or-update.vue

@ -3,37 +3,42 @@
:title="!dataForm.ticketsId ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px">
<el-form-item label="小车类型" prop="carType">
<el-input v-model="dataForm.carType" placeholder="小车类型"></el-input>
<el-select v-model="dataForm.carType" placeholder="小车类型">
<el-option
v-for="item in carTypeOpt"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="异常类型" prop="errorType">
<el-input v-model="dataForm.errorType" placeholder="异常类型"></el-input>
<el-select v-model="dataForm.carType" placeholder="小车类型">
<el-option
v-for="item in errorTypeOpt"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="合同编号" prop="contractNumber">
<el-input v-model="dataForm.contractNumber" placeholder="合同编号"></el-input>
</el-form-item>
<el-form-item label="客户id" prop="clientId">
<el-form-item label="客户" prop="clientId">
<el-input v-model="dataForm.clientId" placeholder="客户id"></el-input>
</el-form-item>
<el-form-item label="故障描述" prop="description">
<el-input v-model="dataForm.description" placeholder="故障描述"></el-input>
</el-form-item>
<el-form-item label="部门对接人" prop="deptPeople">
<el-input v-model="dataForm.deptPeople" placeholder="部门对接人"></el-input>
</el-form-item>
<el-form-item label="客户联系电话" prop="deptPhone">
<el-input v-model="dataForm.deptPhone" placeholder="客户联系电话"></el-input>
</el-form-item>
<el-form-item label="是否验收" prop="isCheck">
<el-form-item v-show="dataForm.ticketsId" label="是否验收" prop="isCheck">
<el-input v-model="dataForm.isCheck" placeholder="是否验收"></el-input>
</el-form-item>
<el-form-item label="工单状态" prop="status">
<el-input v-model="dataForm.status" placeholder="工单状态"></el-input>
</el-form-item>
<el-form-item label="工单关闭时间" prop="updateTime">
<el-input v-model="dataForm.updateTime" placeholder="工单关闭时间"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
@ -47,6 +52,8 @@
data () {
return {
visible: false,
carTypeOpt: [],
errorTypeOpt: [],
dataForm: {
ticketsId: null,
carType: '',
@ -54,11 +61,8 @@
contractNumber: '',
clientId: '',
description: '',
deptPeople: '',
deptPhone: '',
isCheck: '',
status: '',
updateTime: ''
isCheck: ''
},
dataRule: {
carType: [
@ -67,29 +71,11 @@
errorType: [
{ required: true, message: '异常类型不能为空', trigger: 'blur' }
],
contractNumber: [
{ required: true, message: '合同编号不能为空', trigger: 'blur' }
],
clientId: [
{ required: true, message: '客户id不能为空', trigger: 'blur' }
],
description: [
{ required: true, message: '故障描述不能为空', trigger: 'blur' }
],
deptPeople: [
{ required: true, message: '部门对接人不能为空', trigger: 'blur' }
],
deptPhone: [
{ required: true, message: '客户联系电话不能为空', trigger: 'blur' }
],
isCheck: [
{ required: true, message: '是否验收不能为空', trigger: 'blur' }
],
status: [
{ required: true, message: '工单状态不能为空', trigger: 'blur' }
],
updateTime: [
{ required: true, message: '工单关闭时间不能为空', trigger: 'blur' }
]
}
}
@ -100,10 +86,16 @@
methods: {
getDictDetail () {
this.$http({
url: this.$http.adornUrl('/api/dict/dictDetail?code=DEMAND_TYPE'),
url: this.$http.adornUrl('/api/dict/dictDetail?code=car_type&page=0&size=9999'),
method: 'get'
}).then(({data}) => {
console.log(data)
this.carTypeOpt = [...data.content]
})
this.$http({
url: this.$http.adornUrl('/api/dict/dictDetail?code=error_type&page=0&size=9999'),
method: 'get'
}).then(({data}) => {
this.errorTypeOpt = [...data.content]
})
},
init (id) {
@ -123,11 +115,8 @@
this.dataForm.contractNumber = data.tickets.contractNumber
this.dataForm.clientId = data.tickets.clientId
this.dataForm.description = data.tickets.description
this.dataForm.deptPeople = data.tickets.deptPeople
this.dataForm.deptPhone = data.tickets.deptPhone
this.dataForm.isCheck = data.tickets.isCheck
this.dataForm.status = data.tickets.status
this.dataForm.updateTime = data.tickets.updateTime
}
})
}
@ -140,19 +129,7 @@
this.$http({
url: this.$http.adornUrl(`/tickets/tickets/${!this.dataForm.ticketsId ? 'save' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'ticketsId': this.dataForm.ticketsId || undefined,
'carType': this.dataForm.carType,
'errorType': this.dataForm.errorType,
'contractNumber': this.dataForm.contractNumber,
'clientId': this.dataForm.clientId,
'description': this.dataForm.description,
'deptPeople': this.dataForm.deptPeople,
'deptPhone': this.dataForm.deptPhone,
'isCheck': this.dataForm.isCheck,
'status': this.dataForm.status,
'updateTime': this.dataForm.updateTime
})
data: this.$http.adornData(this.dataForm)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({

Loading…
Cancel
Save