Commit 211252fb by wangweidong
parents 429c0f43 66d5ba9e
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
<span v-else-if="item.key==='flower'"> <span v-else-if="item.key==='flower'">
<!-- <Input v-model="scope.row.person" name="person" placeholder="请输入流转人" style="width: 100px;" />--> <!-- <Input v-model="scope.row.person" name="person" placeholder="请输入流转人" style="width: 100px;" />-->
<Input <Input
readonly="readonly"
v-model="scope.row.flower" v-model="scope.row.flower"
readonly="readonly"
placeholder="请选择人员" placeholder="请选择人员"
@click.native="_selectStaff(scope.$index)" @click.native="_selectStaff(scope.$index)"
/> />
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
<script> <script>
import UserInfo from '../../components/user-info-single/assignPerson' import UserInfo from '../../components/user-info-single/assignPerson'
import { drugSample } from '../../api' import { drugSample } from '../../api'
import Global from '../../api/config'
export default { export default {
name: 'TransferListModal', name: 'TransferListModal',
...@@ -144,20 +145,21 @@ export default { ...@@ -144,20 +145,21 @@ export default {
}, },
_userData(data, msg, index, contractTempData) { _userData(data, msg, index, contractTempData) {
console.log(data) console.log(data)
console.log(this.getPage.records)
// 选择人员返回数据 // 选择人员返回数据
// 选择业务员 // 选择业务员
this.person = data.realname this.person = data.realname
alert(this.dataIndex)
this.getPage.records[this.dataIndex].flowerId = data.userId
this.getPage.records[this.dataIndex].flower = data.realname this.getPage.records[this.dataIndex].flower = data.realname
// alert(this.dataIndex)
this.getPage.records[this.dataIndex].flowerId = data.userId
// console.log(this.person) // console.log(this.person)
// this.getPage = data // this.getPage = data
console.log(this.getPage.records)
}, },
_open(data) { _open(data) {
this.showListModal = true this.showListModal = true
this.getPage.records = [] this.getPage.records = []
const length = data.length const length = data.length
const user = Global.getUserInfo()
for (let i = 0; i < length; i++) { for (let i = 0; i < length; i++) {
const object = data[i] const object = data[i]
const obj = {} const obj = {}
...@@ -166,9 +168,11 @@ export default { ...@@ -166,9 +168,11 @@ export default {
obj.name = object.name obj.name = object.name
obj.groupName = object.groupName obj.groupName = object.groupName
obj.groupId = object.groupId obj.groupId = object.groupId
obj.flower = user.realname
obj.flowerId = user.userId
obj.flowQuantity = 1
this.getPage.records.push(obj) this.getPage.records.push(obj)
} }
this.$refs.pageTable._initTable() this.$refs.pageTable._initTable()
}, },
_footerResult(msg) { _footerResult(msg) {
......
...@@ -98,10 +98,13 @@ ...@@ -98,10 +98,13 @@
<span v-else-if="item.key==='sampleQuantity'" @click.stop="_handleRow(scope)"> <span v-else-if="item.key==='sampleQuantity'" @click.stop="_handleRow(scope)">
<el-input <el-input
v-model="scope.row.sampleQuantity" v-model="scope.row.sampleQuantity"
type="number"
size="medium" size="medium"
placeholder="请输入样品量" placeholder="请输入样品量"
@keydown.native="channelInputLimit"
@blur="_handleSampleQuantityEdit(scope.row.id,scope.row.sampleQuantity)" @blur="_handleSampleQuantityEdit(scope.row.id,scope.row.sampleQuantity)"
/> />
</span> </span>
...@@ -120,6 +123,22 @@ ...@@ -120,6 +123,22 @@
<span v-else-if="item.key==='recordWriiten'"> <span v-else-if="item.key==='recordWriiten'">
{{ scope.row[item.key]==='t'?'是':'否' }} {{ scope.row[item.key]==='t'?'是':'否' }}
</span> </span>
<span v-else-if="item.key==='failQuantity'">
<el-input
v-model="scope.row.failQuantity"
type="number"
@keydown.native="channelInputLimit"
@blur="_handleFailQuantityEdit(scope.row.id,scope.row.failQuantity)"
/>
</span>
<span v-else-if="item.key==='deviation'">
<el-input
v-model="scope.row.deviation"
size="medium"
placeholder="请输入检测结果"
@blur="_handleDeviationEdit(scope.row.id,scope.row.deviation)"
/>
</span>
<span v-else>{{ scope.row[item.key] }}</span> <span v-else>{{ scope.row[item.key] }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -277,6 +296,15 @@ export default { ...@@ -277,6 +296,15 @@ export default {
} }
}, },
methods: { methods: {
channelInputLimit(e) {
const key = e.key
// 不允许输入'e'和'.'
if (key === 'e' || key === '.') {
e.returnValue = false
return false
}
return true
},
// 分配时间 // 分配时间
_assignDateChange(data) { _assignDateChange(data) {
this.formObj.assignDateBegin = data[0] this.formObj.assignDateBegin = data[0]
...@@ -578,6 +606,33 @@ export default { ...@@ -578,6 +606,33 @@ export default {
} }
}, },
_handleDeviationEdit: async function(id, deviation) {
if (deviation !== '' && undefined !== deviation) {
const data = {}
data.id = id
data.deviation = deviation
const result = await drugItem.edit(data)
if (result) {
// await this._page()
} else {
this.$Message.error('保存失败')
}
}
},
_handleFailQuantityEdit: async function(id, failQuantity) {
if (failQuantity !== '' && undefined !== failQuantity) {
const data = {}
data.id = id
data.failQuantity = failQuantity
const result = await drugItem.edit(data)
if (result) {
// await this._page()
} else {
this.$Message.error('保存失败')
}
}
},
_handleSampleQuantityEdit: async function(id, sampleQuantity) { _handleSampleQuantityEdit: async function(id, sampleQuantity) {
if (sampleQuantity !== '' && undefined !== sampleQuantity) { if (sampleQuantity !== '' && undefined !== sampleQuantity) {
const data = {} const data = {}
...@@ -585,7 +640,7 @@ export default { ...@@ -585,7 +640,7 @@ export default {
data.sampleQuantity = sampleQuantity data.sampleQuantity = sampleQuantity
const result = await drugItem.edit(data) const result = await drugItem.edit(data)
if (result) { if (result) {
await this._page() // await this._page()
} else { } else {
this.$Message.error('保存失败') this.$Message.error('保存失败')
} }
......
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