Commit 639a8d4c by lichengming
parents a01d8130 2eb4a113
......@@ -81,6 +81,11 @@ export default {
.post('meter/v1/sample/subpackage_out_stock?ids=' + data.ids, data.obj)
.then(res => res),
subpackageInStock: data =>
http
.post('meter/v1/sample/subpackage_in_stock?ids=' + data.ids, data.obj)
.then(res => res),
submitReceive: data =>
http.post('meter/v1/sample/submit_receive?ids=' + data).then(res => res),
......
......@@ -60,10 +60,10 @@
</div>
</Modal>
<MeterSubSampleEdit ref="batchEditModal" @on-result-change="_page"></MeterSubSampleEdit>
<SubOutWarehouse ref="OutWarehouseModal" ></SubOutWarehouse>
<SubResultInput ref="ResultInputModal"></SubResultInput>
<UploadByReport ref="UploadModal"></UploadByReport>
<HisRevision ref="HisModal"></HisRevision>
<SubOutWarehouse ref="OutWarehouseModal" @on-result-change="_page"></SubOutWarehouse>
<SubResultInput ref="ResultInputModal" @on-result-change="_page"></SubResultInput>
<UploadByReport ref="UploadModal" @on-result-change="_page"></UploadByReport>
<HisRevision ref="HisModal" @on-result-change="_page"></HisRevision>
</div>
</template>
<script>
......@@ -98,30 +98,16 @@ export default {
// {id: '', name: '删除'},
// ],
iconMsg: [
{ type: 'md-create', id: '', name: '检测结果录入' },
{ type: 'md-create', id: '', name: '分包结果录入' },
{ type: 'ios-list', id: '', name: '历史版本' },
{ type: 'ios-cloud-upload', id: '', name: '上传' },
{ type: 'compose', id: '', name: '编辑' },
{ type: 'ios-copy', id: '', name: '复制', componentName: 'CopyModal' },
{ type: 'trash-a', id: '', name: '删除' }
{ type: 'ios-cloud-upload', id: '', name: '分包证书上传' },
{ type: 'compose', id: '', name: '编辑' }
],
btn: [
{
// meter-review-entrust-pass-btn
type: 'success',
id: '',
name: '分包信息登记'
},
// meter-review-entrust-back-btn
{
type: 'success',
id: '',
name: '取消分包'
},
{
type: 'success',
id: '',
name: '分包出库'
name: '分包返库'
}
],
options: [
......@@ -151,8 +137,10 @@ export default {
{ title: '分包费用', key: 'outFee', width: 110 },
{ title: '分包原因', key: 'outReason', width: 110 },
{ title: '分包方', key: 'subcontractor', width: 110 },
{ title: '出库人', key: 'outer', width: 130 },
{ title: '出库时间', key: 'outStockTime', width: 110, dateTime: true },
{ title: '出库人', key: 'outer', width: 140 },
{ title: '出库时间', key: 'outStockTime', width: 140, dateTime: true },
{ title: '返库人', key: 'inner', width: 130 },
{ title: '返库时间', key: 'inStockTime', width: 150, dateTime: true },
{ title: '检测类型', key: 'type', width: 140 },
{ title: '数量', key: 'quantity', width: 140 }
],
......@@ -192,7 +180,7 @@ export default {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '分包库':
case '分包库':
this._outWarehouse()
break
case '分包信息登记':
......@@ -244,10 +232,10 @@ export default {
case '历史版本':
this._HisEdit(data)
break
case '上传':
case '分包证书上传':
this._upload(data)
break
case '检测结果录入':
case '分包结果录入':
this._resultModal(data)
break
case '编辑':
......
......@@ -86,7 +86,6 @@ export default {
name: '分包样品管理'
},
{ type: 'md-cloud', id: '', name: '附件' },
{ type: 'md-trash', id: '', name: '删除' },
{
type: 'md-book',
id: '',
......
<template>
<div>
<Modal v-model="showModal" :mask-closable="false" width="700">
<p slot="header">分包</p>
<p slot="header">分包</p>
<div>
<Form id="batch-edit-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="90">
<Form-item label="出库人:" prop="outer">
<Form-item label="返库人:" prop="inner">
<!-- <InputNumber v-model.number="formObj.outFee" :min="0" :step="1"-->
<!-- name="outFee" style="width:100%" placeholder="">-->
<!-- </InputNumber>-->
<Input v-model="formObj.outer" readonly name="outer" @click.native="_selectStaff"></Input>
<Input v-model="formObj.inner" readonly name="inner" @click.native="_selectStaff"></Input>
</Form-item>
<Form-item label="出库时间:" prop="outStockTime">
<Form-item label="返库时间:" prop="inStockTime">
<div class="block">
<el-date-picker
v-model="formObj.outStockTime"
v-model="formObj.inStockTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间">
......@@ -48,9 +48,9 @@ import EditLabSelect from './EditLabSelect'
* 添加编辑分包信息
*/
const defVal = {
outer: undefined,
outerId: undefined,
outStockTime: undefined,
inner: undefined,
innerId: undefined,
inStockTime: undefined,
remark: undefined
}
export default {
......@@ -97,13 +97,13 @@ export default {
console.log('当前时间', defaultDate)
console.log('时间', now)
// this.formObj.outTime = now
this.formObj.outStockTime = defaultDate
this.formObj.inStockTime = defaultDate
// this.$set(this.searchFormField, 'date', defaultDate)
},
_userData(data, msg, contractTempData) {
if (msg === 'salesman') {
// 选择业务员
this.formObj.outPerson = data.realname
this.formObj.inner = data.realname
// this.formObj.detail.salesmanId = data.userId
// this.formObj.detail.salesmanPhone = data.mobile
}
......@@ -128,10 +128,11 @@ export default {
this._subpackageOutStock({ ids: this.ids, obj: this.formObj })
},
_subpackageOutStock: async function(data) {
const result = await meterSample.subpackageOutStock(data)
const result = await meterSample.subpackageInStock(data)
if (result) {
this.$Message.success('库成功!')
this.$Message.success('库成功!')
this.$emit('on-result-change')
this.showModal = false
this._hideLoading()
}
},
......@@ -141,9 +142,9 @@ export default {
},
_open(ids, selectData) {
this.formObj = {
outer: undefined,
outerId: undefined,
outStockTime: undefined,
inner: undefined,
innerId: undefined,
inStockTime: undefined,
remark: undefined
}
this._userInfo()
......@@ -164,8 +165,8 @@ export default {
},
_userInfo() {
const user = Global.getUserInfo('userInfo')
this.formObj.outer = user.realname
this.formObj.outerId = user.id
this.formObj.inner = user.realname
this.formObj.innerId = user.id
},
_labSel() {
......
......@@ -261,7 +261,7 @@ export default {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterItem.pageTest(this.formObj)
const result = await meterItem.page(this.formObj)
console.log('result', result)
if (result) {
this.getPage = result
......
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