Commit 9748869e by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

parents fde986f9 2e879e99
......@@ -45,15 +45,16 @@
</Row>
</div>
</div>
<MeterSendOperation ref="operationModal"></MeterSendOperation>
<MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit>
</div>
</template>
<script>
import { meterEntrust, meterSubcontractor } from '../../../api'
import MeterSubcontractorEdit from './MeterSendTestEdit'
import MeterSendOperation from './MeterSendOperation'
export default {
components: { MeterSubcontractorEdit },
components: { MeterSubcontractorEdit, MeterSendOperation },
data() {
return {
currentComponent: '',
......@@ -192,7 +193,7 @@ export default {
}
},
_record(id) {
this.$refs.refModal._open(id)
this.$refs.operationModal._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
......
<template>
<div>
<Modal v-model="showModal" width="900" class="modal-footer-none zIndex-1100">
<p slot="header">操作日志</p>
<div>
<Row>
<!--查询-->
<Col span="24">
<Form id="search-contract-record" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="操作阶段:">
<Input v-model="formObj.origin" @on-enter="_search" placeholder="请输入操作阶段"
style="width: 200px" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_search" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :tableHeight="tableHeight"
@on-result-change="_tableResultChange" :getPage="getPage" hide-checkbox>
<vxe-table-column
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined"
v-for="item in pageColumns" :key="item.key">
<template slot-scope="scope">
<span v-if="item.key==='type'">
{{scope.row[item.key] === 0 ? '流转' : scope.row[item.key] === 1 ? '退回': scope.row[item.key] === 2 ?'更新' :
scope.row[item.key] === 3 ? '转发':'文件'}}
</span>
<span v-else-if="item.key==='ctime'">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd HH:MM:ss'):''}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<script>
/**
* 操作日志-委托
*/
import { meterEntrust } from '../../../api'
export default {
data() {
return {
showModal: false,
getPage: {},
pageColumns: [
{ title: '操作类型', key: 'type', width: 80 },
{ title: '操作阶段', key: 'origin', width: 120 },
{ title: '目标阶段', key: 'target', width: 120 },
{ title: '操作人', key: 'operator', width: 80 },
{ title: '操作时间', key: 'ctime', width: 150 },
{ title: '操作原因', key: 'remark' },
{ title: '责任人', key: 'liable', width: 80 }
],
formObj: {
origin: '',
contractId: ''
}
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('tableModal')
}
},
methods: {
_open(contractId) {
this.showModal = true
this.formObj.contractId = contractId
this.formObj.origin = ''
this._page()
},
_page: async function() {
console.log('要传的参数')
console.log(this.formObj)
const result = await meterEntrust.pageOutTaskOperation(this.formObj)
console.log(result)
if (result) {
this.getPage = result
}
// this.$refs.pageTable._page(
// 'search-contract-record',
// 'FoodContractRecord/page',
// this.$serializeFormSearch(this.formObj)
// )
},
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this.getPage = this.$store.state.FoodContractRecord.page
break
case 'changeSize':
this._page()
break
}
},
_search() {
this.$refs.pageTable._pageChange(1)
}
}
}
</script>
......@@ -57,12 +57,16 @@
</Row>
</div>
</Modal>
<assignPerson ref="userModal" @on-result-change="_userData" is-change></assignPerson>
</div>
</template>
<script>
import { meterSample } from '../../../api'
import Global from '../../../api/config'
import assignPerson from '../../../components/user-info-single/assignPerson'
export default {
components: {
assignPerson
// FoodSampleGovernDetail,
// CopyModal,
// FoodSampleGovernLYEdits
......@@ -154,6 +158,9 @@ export default {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '分配任务':
this._changePeople()
break
case '添加':
this._editModal(false)
break
......@@ -172,6 +179,26 @@ export default {
}
})
},
_userData(data, msg, contractTempData) {
if (msg === 'salesman') {
// this.salesman = data.realname
// this.formObj.detail.salesmanId = data.userId
// this.formObj.detail.salesmanPhone = data.mobile
console.log('选择人员返回值')
console.log(data)
}
},
_changePeople() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择至少一项数据!')
} else {
const user = Global.getUserInfo('userInfo')
console.log('用户')
console.log(user)
// this.$refs.userModal._openGoupByUserId('分配人员', user.id, '')
this.$refs.userModal._open('salesman')
}
},
_iconClick(res, data, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
......
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