Commit 7a39edd4 by lichengming

修改了开土制备批量填写信息

parent 8b899c1e
......@@ -34,5 +34,10 @@ export default {
.post('soil/v1/statistics/page_coordinate_statistics', data)
.then(res => res),
filePage: data =>
http.post('soil/v1/standard_annex/page', data).then(res => res)
http.post('soil/v1/standard_annex/page', data).then(res => res),
// 待完成委托量
pageWaitEnd: data =>
http
.post('soil/v1/statistics/page_wait_end_entrust_statistics', data)
.then(res => res)
}
......@@ -124,6 +124,7 @@
<!--打印标签-->
<!--选择人员-->
</Modal>
<SampleParpareBatchEdit ref="batchEdit"></SampleParpareBatchEdit>
</div>
</template>
......@@ -131,10 +132,12 @@
import AutoComplete from '../../../components/base/AutoCompletes'
import Global from '../../../api/config'
import { soilEntrust } from '../../../api'
import SampleParpareBatchEdit from './SampleParpareBatchEdit'
export default {
components: {
AutoComplete
AutoComplete,
SampleParpareBatchEdit
},
data() {
return {
......@@ -151,7 +154,8 @@ export default {
],
btn: [
{ type: 'success', id: '', name: '打印标签' },
{ type: 'error', id: '', name: '删除' }
{ type: 'error', id: '', name: '删除' },
{ type: 'success', id: '', name: '批量填写制备信息' }
],
iconMsg: [
// { type: 'md-create', id: '', name: '批量赋值' },
......@@ -515,11 +519,21 @@ export default {
this.$Message.warning('请至少选择一条数据')
}
break
case '批量填写制备信息':
this._writeInfo()
break
case '删除':
this._deleteSelected()
break
}
},
_writeInfo() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择一条或多条数据!')
} else {
this.$refs.batchEdit._open(this.selectIds)
}
},
_printerResult(data) {
this.$refs.printNumber._open(this.selectData, data.printerVal)
},
......
<template>
<div>
<Modal v-model="showModal" :mask-closable="false">
<p slot="header">填写制备信息</p>
<div>
<Form id="storage-location-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="100">
<Form-item label="制备方式:" prop="prepareWay">
<el-select :value="formObj.prepareWay" @change="selPrepareWay" style="width:100%" size="small">
<el-option v-for="item in prepareWayList" :value="item.name" :key="item.name">{{ item.name }}
</el-option>
</el-select>
</Form-item>
<Form-item label="制备数量:" prop="quantity">
<el-input
v-model="formObj.quantity"
@keydown.native="channelInputLimit"
clearable
type="number"
placeholder="请输入或选择数量"
/>
</Form-item>
<Form-item label="单位:">
<Input v-model="formObj.unit" clearable placeholder="请输入单位"></Input>
</Form-item>
<Form-item label="保存方式:">
<el-select :value="formObj.keepWay" @change="selKeepWay" style="width:100%" size="small">
<el-option v-for="item in keepWayList" :value="item.name" :key="item.name">{{ item.name }}
</el-option>
</el-select>
</Form-item>
<Form-item label="保存容器:">
<el-select :value="formObj.keepContainer" @change="selKeepContainer" style="width:100%" size="small">
<el-option v-for="item in keepContainerList" :value="item.name" :key="item.name">{{ item.name }}
</el-option>
</el-select>
</Form-item>
<Form-item label="制备人:">
<el-select :value="formObj.preparer" @change="selUser" style="width:100%" size="small">
<el-option v-for="item in backupUserList" :value="item.id" :label="item.realname" :key="item.realname">{{ item.realname }}
</el-option>
</el-select>
</Form-item>
</Form>
</div>
<div slot="footer">
<modal-footer ref="footerModal" @on-result-change="_footerResult" :footer="footerList"></modal-footer>
</div>
</Modal>
</div>
</template>
<script>
import { soilSample } from '../../../api'
export default {
components: {},
data() {
return {
ids: [], // 委托ids
showModal: false,
formObj: {},
ruleValidate: {},
footerList: [
{ id: '', name: '取消', type: '' },
{ id: '', name: '保存', type: 'primary' }
],
conditionList: [],
locList: [],
backupUserList: [],
prepareWayList: [],
keepWayList: [],
keepContainerList: [],
sampleUnit: ''
}
},
mounted() {
this._getPrepareWay()
this._getkeepWayList()
this._getkeepContainerList()
this._getUserList()
},
methods: {
_locChange(msg, data) {
switch (msg) {
case 'select':
this.formObj.backupPlace = data.backupPlace
this._getCondition(data.backupPlace)
break
case 'query':
this.formObj.backupPlace = data.backupPlace
this._getLocList(data.backupPlace)
break
}
},
channelInputLimit(e) {
const key = e.key
// 不允许输入'e'和'.'
if (key === 'e' || key === '.') {
e.returnValue = false
return false
}
return true
},
selPrepareWay(data) {
this.$forceUpdate()
this.formObj.prepareWay = data
},
selKeepWay(data) {
this.$forceUpdate()
this.formObj.keepWay = data
},
selKeepContainer(data) {
this.$forceUpdate()
this.formObj.keepContainer = data
},
selUser(data) {
this.$forceUpdate()
if (data) {
for (let i = 0; i < this.backupUserList.length; i++) {
if (this.backupUserList[i].id === data) {
this.formObj.preparer = this.backupUserList[i].realname
}
}
} else {
this.getPage.records[this.currentIndex].preparer = ''
}
this.formObj.preparerId = data
// this.$forceUpdate()
// this.getPage.records[this.currentIndex].backupUser = data
// this.getPage.records[this.currentIndex].backupUser = data
},
// 存储条件 回调
_locChangeCondition(msg, data) {
switch (msg) {
case 'select':
this.formObj.storageCondition = data.name
this._getLocCondition(data.name)
break
case 'query':
this.formObj.storageCondition = data.name
this._getLocConditionList(data.name)
break
}
},
_footerResult(name) {
switch (name) {
case '取消':
this._cancel()
break
case '保存':
this._ok()
break
}
},
_open(data) {
this.showModal = true
this.formObj = this.$resetFields(this.formObj)
this.sampleUnit = ''
this.$refs.footerModal._hideLoading()
this.ids = data
// 循环遍历数据
},
_getPrepareWay: async function() {
const result = await soilSample.getDictList('制备方式')
if (result) {
this.prepareWayList = result
}
},
_getkeepWayList: async function() {
const result = await soilSample.getDictList('保存方式')
if (result) {
this.keepWayList = result
}
},
_getkeepContainerList: async function() {
const result = await soilSample.getDictList('保存容器')
if (result) {
this.keepContainerList = result
}
},
_getUserList: async function() {
const result = await soilSample.getUserList()
if (result) {
console.log(result)
this.backupUserList = result.records
}
},
//
_dateChange(data) {
this.formObj.endDate = data
},
_cancel() {
this.showModal = false
this.$refs.footerModal._hideLoading()
},
_hideLoading() {
this.$refs.footerModal._hideLoading()
},
_ok() {
console.log(this.formObj)
this.$refs.formObj.validate(valid => {
if (valid) {
const data = this.formObj
this._saveInfo({ id: this.ids.join(','), obj: data })
this.$refs.footerModal._hideLoading()
} else {
this.$Message.error('表单验证失败!')
this.$refs.footerModal._hideLoading()
}
})
},
_saveInfo: async function(data) {
const result = await soilSample.editBackup(data)
if (result) {
this.$Message.success('保存成功')
}
}
}
}
</script>
......@@ -5,31 +5,31 @@
<p class="fl">待完成委托 {{total}} </p>
<div class="fr">
<Tooltip content="刷新" placement="left-start">
<Icon @click="_request" type="ios-refresh" size="30" color="#2d8cf0" style="cursor:pointer;"></Icon>
</Tooltip>
<Tooltip content="查看更多" placement="left-start" style="margin-left: 5px">
<Icon @click="_detail" type="ios-more" size="30" color="#2d8cf0" style="cursor:pointer;"></Icon>
<Icon @click="_page" type="ios-refresh" size="30" color="#2d8cf0" style="cursor:pointer;"></Icon>
</Tooltip>
<!-- <Tooltip content="查看更多" placement="left-start" style="margin-left: 5px">-->
<!-- <Icon @click="_detail" type="ios-more" size="30" color="#2d8cf0" style="cursor:pointer;"></Icon>-->
<!-- </Tooltip>-->
</div>
<div class="clear"></div>
</div>
<div style="width: 100%;">
<element-table ref="pageTable" :pageColumns="pageColumns"
:tableHeight="tableHeight" :getPage="tableData" hide-checkbox>
<el-table-column
:prop="item.key"
:label="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined"
<PTVXETableHeight ref="pageTable" :table-height="300" :loading="true"
:get-page="getPage" hide-checkbox="true">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
show-overflow-tooltip sortable>
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span v-if="item.date">{{$dateformat(scope.row[item.key],'yyyy-mm-dd')}}</span>
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<span v-else-if="item.status">{{scope.row[item.key].display}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</el-table-column>
</element-table>
</vxe-table-column>
</PTVXETableHeight>
</div>
</Card>
<!--未完成委托列表-->
......@@ -37,16 +37,19 @@
</template>
<script>
import { soilStatistics } from '../../api'
export default {
components: {},
data() {
return {
tableData: { records: [] },
getPage: {},
pageColumns: [
{ title: '委托单位', key: 'cname' },
{ title: '委托编号', key: 'code', width: 180 },
{ title: '应出报告日期', key: 'reportDueDate', date: true },
{ title: '状态', key: 'progress', width: 110 }
{ title: '委托单位', key: 'client' },
{ title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '状态', key: 'progress', width: 110, status: true },
{ title: '委托日期', key: 'entrustDate', date: true }
],
tableHeight: '280',
total: ''
......@@ -54,11 +57,19 @@ export default {
},
mounted() {
// this._request()
this._page()
},
methods: {
_detail() {
this.$refs.unfinishedDetail._open()
},
_page: async function() {
const result = await soilStatistics.pageWaitEnd()
if (result) {
console.log(result)
this.getPage = result
}
},
_request() {
this.$refs.pageTable._hideLoading()
this.$store
......
......@@ -29,7 +29,7 @@
<myTask />
</Col>
<Col span="12" style="margin-bottom: 10px">
<taskFlow />
<TaskFlow />
</Col>
<Col span="12" style="margin-bottom: 10px">
<taskCalendar />
......@@ -72,7 +72,7 @@ import statisticalPanel from './statisticalPanel'
import messagePanel from './messagePanel'
import toDoTask from './ToDoTask'
import myTask from './MyTask'
import taskFlow from './TaskFlow'
import TaskFlow from './TaskFlow'
import taskCalendar from './task-calendar/TaskCalendar'
import UnfinishedContract from './UnfinishedContract'
import UnfinishedItem from './UnfinishedItem'
......@@ -90,7 +90,7 @@ export default {
messagePanel,
myTask,
toDoTask,
taskFlow,
TaskFlow,
taskCalendar,
UnfinishedContract,
UnfinishedItem,
......
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