Commit 3d50a900 by lichengming

修改了产品检测添加模块

parent 0ddb8e0d
...@@ -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,19 @@ export default { ...@@ -366,6 +400,19 @@ 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
return oYear + str + oMoth + str + oDay
},
_selectMaterielName() { _selectMaterielName() {
this.$refs.materialModal._open() this.$refs.materialModal._open()
}, },
...@@ -468,6 +515,8 @@ export default { ...@@ -468,6 +515,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) {
......
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