Commit d0153d25 by lichengming

修改了试验项目分配调整检测人

parent 8c44b00e
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:"> <Form-item class="search-item" label="检测项目:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input> <Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
...@@ -51,7 +51,9 @@ export default { ...@@ -51,7 +51,9 @@ export default {
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
formObj: {}, formObj: {
name: undefined
},
tableName: 'food-task-assign-item-left', tableName: 'food-task-assign-item-left',
// 用户自己选中的列 // 用户自己选中的列
userColumns: [], userColumns: [],
......
...@@ -5,22 +5,22 @@ ...@@ -5,22 +5,22 @@
<Col span="24"> <Col span="24">
<Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:"> <Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.client" placeholder="请输入检测项目" clearable @on-enter="_formSearch"></Input> <Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</Col> </Col>
<!--操作--> <!--操作-->
<Col span="24"> <Col span="24">
<btn-list :msg="btn" class="contHide" @on-result-change="_btnClick"></btn-list> <btn-list :msg="btn" @on-result-change="_btnClick" class="contHide"></btn-list>
</Col> </Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :page-columns="pageColumns" :table-height="tableHeight" <PTVXETable ref="pageTable" :page-columns="pageColumns" :table-height="tableHeight"
:get-page="getPage" :table-name="tableName" is-task select-data @on-result-change="_tableResultChange"> :get-page="getPage" :table-name="tableName" @on-result-change="_tableResultChange" is-task select-data>
<vxe-table-column <vxe-table-column
v-for="item in userColumns.length > 0 ?userColumns:pageColumns" v-for="item in userColumns.length > 0 ?userColumns:pageColumns"
:key="item.key" :key="item.key"
...@@ -63,8 +63,10 @@ export default { ...@@ -63,8 +63,10 @@ export default {
entrustId: '', entrustId: '',
name: '', name: '',
testMethod: '', testMethod: '',
testBasis: '' testBasis: '',
sampleCode: undefined
}, },
itemName: '',
entrustId: '', entrustId: '',
// 用户自己选中的列 // 用户自己选中的列
userColumns: [], userColumns: [],
...@@ -76,7 +78,7 @@ export default { ...@@ -76,7 +78,7 @@ export default {
{ title: '试样编号', key: 'sampleCode', width: 180 }, { title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '试验人员', key: 'tester', width: 180 }, { title: '试验人员', key: 'tester', width: 180 },
{ title: '分配人', key: 'alloter', width: 180 }, { title: '分配人', key: 'alloter', width: 180 },
{ title: '分配时间', key: 'allotTime', width: 180 }, { title: '分配时间', key: 'allotTime', width: 180, datetime: true },
{ title: '试样深度', key: 'sampleDepth', width: 180 }, { title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '试样包装类型', key: 'samplePack', width: 180 }, { title: '试样包装类型', key: 'samplePack', width: 180 },
{ title: '大类', key: 'mainType', width: 140 }, { title: '大类', key: 'mainType', width: 140 },
...@@ -164,6 +166,10 @@ export default { ...@@ -164,6 +166,10 @@ export default {
break break
} }
}, },
_clearPage() {
this.formObj.sampleCode = ''
this.getPage = {}
},
_modalResult(data) { _modalResult(data) {
switch (this.currentComponent) { switch (this.currentComponent) {
case 'AssignPerson': case 'AssignPerson':
...@@ -237,10 +243,8 @@ export default { ...@@ -237,10 +243,8 @@ export default {
switch (msg) { switch (msg) {
case '按人分配': case '按人分配':
this._allotByPerson() this._allotByPerson()
// await this._reportDueDate()
// await this._userAssign()
break break
case '试验项目分配': case '调整试验项目检测人':
this._userAssign() this._userAssign()
break break
case '按组分配': case '按组分配':
...@@ -343,13 +347,6 @@ export default { ...@@ -343,13 +347,6 @@ export default {
switch (msg) { switch (msg) {
case 'page': case 'page':
this._page() this._page()
// this.result = this.getPage.records;
// this.$nextTick(() => {
// this.$refs.pageTable._checkAll()
// })
// if (this.getPage.records.length === 0) {
// this.$emit('on-result-change')
// }
break break
case 'selectData': case 'selectData':
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
...@@ -378,7 +375,7 @@ export default { ...@@ -378,7 +375,7 @@ export default {
this._allotItems(tempData) this._allotItems(tempData)
}, },
_allotItems: async function(data) { _allotItems: async function(data) {
const result = await soilTest.allotExp(data) const result = await soilTest.changeExpAllot(data)
if (result) { if (result) {
this._resultChange('分配成功') this._resultChange('分配成功')
} }
...@@ -387,37 +384,6 @@ export default { ...@@ -387,37 +384,6 @@ export default {
const user = Global.getUserInfo('userInfo') const user = Global.getUserInfo('userInfo')
console.log(user) console.log(user)
this.$refs.personModal._openGoup('分配人员', 'itemTree') this.$refs.personModal._openGoup('分配人员', 'itemTree')
// if (this.defaultPlanDate) {
// // 有字典
// if (this.sampleNames === '') {
// // 有计划完成时间
// const user = Global.getUserInfo('userInfo')
// this.currentComponent = 'AssignPerson'
// this.$nextTick(function() {
// this.$refs.refModal._openGoupByUserId(
// '分配人员',
// user.id,
// 'itemTree'
// )
// })
// } else {
// // 有字典,无计划完成时间的
// this.$Modal.confirm({
// title: '提示',
// content:
// '所选项目中含有未设置计划完成时间的' +
// `${this._reportDueDate()}` +
// '请确认!',
// onOk: () => {}
// })
// }
// } else {
// // 无字典
// this.currentComponent = 'EndDateModal'
// this.$nextTick(() => {
// this._endDate()
// })
// }
}, },
// 遍历出计划时间为空的样品名 // 遍历出计划时间为空的样品名
_reportDueDate() { _reportDueDate() {
......
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
pageColumns: [ pageColumns: [
{ title: '试验名称', key: 'name', width: 160 }, { title: '试验名称', key: 'name', width: 160 },
{ title: '样品编号', key: 'sampleCode', width: 160 }, { title: '样品编号', key: 'sampleCode', width: 160 },
{ title: '试验人员', key: 'tester', width: 180 },
{ title: '分配人', key: 'alloter', width: 160 }, { title: '分配人', key: 'alloter', width: 160 },
{ title: '分配时间', key: 'allotTime', width: 160, datetime: true }, { title: '分配时间', key: 'allotTime', width: 160, datetime: true },
{ title: '试验项目英文简写', key: 'shortName', width: 140 }, { title: '试验项目英文简写', key: 'shortName', width: 140 },
......
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