Commit b4bc23b1 by wangweidong

Merge branch 'dev' of http://git.patzn.com/wangweidong/pt-tobacco-lims-web into dev

 Conflicts:
	pages/drug-sample-flow/transferListModal.vue
parents 11b35b84 cf29f055
......@@ -78,7 +78,12 @@
</Form-item>
<Form-item label="计量单位" prop="unit" class="width-32">
<Input v-model="formObj.unit" name="unit" placeholder="计量单位" />
<!-- <Input v-model="formObj.unit" name="unit" placeholder="计量单位" />-->
<Select v-model="formObj.unit">
<Option v-for="item in options" :key="item.name" :value="item.name">
{{ item.name }}
</Option>
</Select>
</Form-item>
<Form-item label="规格" prop="spec" class="width-32">
......@@ -91,6 +96,15 @@
<Form-item label="数量" prop="quantity" class="width-32">
<Input v-model="formObj.quantity" name="quantity" placeholder="数量" />
</Form-item>
<Form-item label="是否流转" prop="flowed" class="width-32">
<el-radio v-model="formObj.flowed" label="0" @change="show">
</el-radio>
<el-radio v-model="formObj.flowed" label="1" @change="show">
</el-radio>
</Form-item>
<!-- <Form-item label="供应商" prop="supplier" class="width-32">-->
<!-- <Input v-model="formObj.supplier" name="supplier" placeholder="选择物料名称后自动生成">-->
<!-- <Icon slot="suffix" type="md-add-circle" @click="_selectSupply"/>-->
......@@ -155,6 +169,19 @@ export default {
id: '',
modalTitle: '',
categoryMultiple: '',
timer: '',
currentTime: new Date(),
options: [
{
name: '支'
},
{
name: '盒'
},
{
name: '条'
}
],
formObj: {
category: '',
standard: '',
......@@ -171,6 +198,7 @@ export default {
spec: '',
lotNum: '',
quantity: '',
flowed: '0',
supplier: '',
supplierId: '',
catalogueId: '',
......@@ -293,6 +321,9 @@ export default {
}
},
methods: {
show() {
console.log(this.formObj.flowed)
},
_testResult(data) {
this.drugItemList = data
this.itemIds = []
......@@ -331,6 +362,9 @@ export default {
this.editId = 'edit-form-product-edit'
this._hideLoading()
this.$refs.itemModal._init()
this.formObj.pcTime = this.getDay(-1, '-')
console.log('时间')
console.log(this.formObj.pcTime)
if (this.$string(formObj).isEmpty()) {
this.id = ''
this.edit = true
......@@ -366,6 +400,38 @@ export default {
this.$refs.itemModal._getItem(formObj.id)
}
},
getDay(num, str) {
const today = new Date()
const nowTime = today.getTime()
const ms = 24 * 3600 * 1000 * num
today.setTime(parseInt(nowTime + ms))
const oYear = today.getFullYear()
let oMoth = (today.getMonth() + 1).toString()
if (oMoth.length <= 1) oMoth = '0' + oMoth
let oDay = today.getDate().toString()
if (oDay.length <= 1) oDay = '0' + oDay
const hours =
today.getHours() < 10 ? '0' + today.getHours() : today.getHours()
const minutes =
today.getMinutes() < 10 ? '0' + today.getMinutes() : today.getMinutes()
const seconds =
today.getSeconds() < 10 ? '0' + today.getSeconds() : today.getSeconds()
// return oYear + str + oMoth + str + oDay + hours + minutes + seconds
return (
oYear +
str +
oMoth +
str +
oDay +
' ' +
hours +
':' +
minutes +
':' +
seconds
)
},
_selectMaterielName() {
this.$refs.materialModal._open()
},
......@@ -468,6 +534,8 @@ export default {
// 请检时间
_obtainSampleTime(data) {
this.formObj.pcTime = this._dateFormat(data)
console.log('时间')
console.log(this.formObj.pcTime)
},
_askEndTime(data) {
......
......@@ -10,9 +10,8 @@
:get-page="getPage"
>
<el-table-column
v-for="item in pageColumns"
:key="item.key"
show-overflow-tooltip
v-for="(item,index) in pageColumns"
:key="index"
sortable
:prop="item.key"
:label="item.title"
......@@ -31,10 +30,21 @@
<InputNumber v-model="scope.row.flowQuantity" name="flowQuantity" placeholder="请输入数量" style="width: 100px;" />
</span>
<span v-else-if="item.key==='unit'">
<Input v-model="scope.row.unit" name="unit" placeholder="请输入单位" style="width: 100px;" />
<!-- <Input v-model="scope.row.unit" name="unit" placeholder="请输入单位" style="width: 100px;" />-->
<Select v-model="scope.row.unit">
<Option v-for="item in options" :key="item.name" :value="item.name" name="unit">
{{ item.name }}
</Option>
</Select>
</span>
<span v-else-if="item.key==='person'">
<Input v-model="scope.row.person" name="person" placeholder="请输入流转人" style="width: 100px;" />
<span v-else-if="item.key==='flower'">
<!-- <Input v-model="scope.row.person" name="person" placeholder="请输入流转人" style="width: 100px;" />-->
<Input
readonly="readonly"
v-model="scope.row.flower"
placeholder="请选择人员"
@click.native="_selectStaff(scope.$index)"
/>
</span>
<span v-else-if="item.key==='flowTime'">
<el-date-picker
......@@ -50,20 +60,26 @@
</template>
</el-table-column>
</element-table>
</Col>
</Row>
<div slot="footer">
<modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult" />
</div>
</Modal>
<UserInfo ref="userModal" is-change @on-result-change="_userData" />
</div>
</template>
<script>
import UserInfo from '../../components/user-info-single/assignPerson'
import { drugSample } from '../../api'
export default {
name: 'TransferListModal',
components: {
UserInfo
},
data() {
return {
showListModal: false,
......@@ -75,9 +91,23 @@ export default {
{ id: '', name: '取消', type: '' }
],
num: 0,
dataIndex: undefined,
unit: '',
person: '',
salesmanId: '',
salesmanPhone: '',
time: '',
options: [
{
name: '支'
},
{
name: '盒'
},
{
name: '条'
}
],
pageColumns: [
{
title: '样本编号',
......@@ -107,6 +137,23 @@ export default {
}
},
methods: {
_selectStaff(index) {
this.dataIndex = index
console.log(index)
this.$refs.userModal._open('salesman')
},
_userData(data, msg, index, contractTempData) {
console.log(data)
console.log(this.getPage.records)
// 选择人员返回数据
// 选择业务员
this.person = data.realname
alert(this.dataIndex)
this.getPage.records[this.dataIndex].flowerId = data.userId
this.getPage.records[this.dataIndex].flower = data.realname
// console.log(this.person)
// this.getPage = data
},
_open(data) {
this.showListModal = true
this.getPage.records = []
......
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