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