Commit 61edf4d3 by lichengming

修改了样品拆分

parent 9fa0bdc3
...@@ -9,13 +9,10 @@ ...@@ -9,13 +9,10 @@
<Row> <Row>
<!--查询--> <!--查询-->
<!--操作--> <!--操作-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" @on-result-change="_btnClick" class="contHide" show-search-btn="true"></btn-list>
</Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true" <PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange" :icon-msg="iconMsg" select-data> :get-page="getPage" :hide-page="true" @on-result-change="_tableResultChange" :icon-msg="iconMsg" select-data>
<vxe-table-column <vxe-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
:key="item.key" :key="item.key"
...@@ -65,11 +62,11 @@ export default { ...@@ -65,11 +62,11 @@ export default {
formId: 'soilSampleManage', formId: 'soilSampleManage',
currentComponent: '', currentComponent: '',
btn: [ btn: [
{ // {
type: 'success', // type: 'success',
id: '', // id: '',
name: '保存' // name: '保存'
} // }
// { // {
// type: 'success', // type: 'success',
// id: '', // id: '',
...@@ -88,7 +85,7 @@ export default { ...@@ -88,7 +85,7 @@ export default {
currentRow: '', currentRow: '',
footerList: [ footerList: [
{ id: '', name: '取消', type: '' }, { id: '', name: '取消', type: '' },
{ id: '', name: '关闭', type: 'primary' } { id: '', name: '保存', type: 'primary' }
], ],
iconMsg: [ iconMsg: [
{ {
...@@ -168,8 +165,8 @@ export default { ...@@ -168,8 +165,8 @@ export default {
case '取消': case '取消':
this._cancel() this._cancel()
break break
case '关闭': case '保存':
this._cancel() this._save()
break break
} }
}, },
...@@ -205,14 +202,16 @@ export default { ...@@ -205,14 +202,16 @@ export default {
}, },
_save() { _save() {
console.log(this.getPage.records) console.log(this.getPage.records)
for (let i = 0; i < this.getPage.records.length; i++) { const data = JSON.parse(JSON.stringify(this.getPage.records))
this.getPage.records[i].id = this.sampleId // for (let i = 0; i < data.length; i++) {
this.getPage.records[i].sampleCode = // data[i].id = this.sampleId
this.getPage.records[i].sampleCode + // data[i].sampleCode = data[i].sampleCode + '-' + (data[i].index + 1)
'-' + // this._addSample(data[i])
(this.getPage.records[i].index + 1) // }
console.log(this.getPage.records[i]) for (let i = 0; i < data.length; i++) {
this._addSample(this.getPage.records[i]) data[i].id = this.sampleId
data[i].sampleCode = data[i].sampleCode + '-' + (data[i].index + 1)
this._addSample(data[i])
} }
}, },
_addSample: async function(data) { _addSample: async function(data) {
...@@ -221,6 +220,7 @@ export default { ...@@ -221,6 +220,7 @@ export default {
this.showModal = false this.showModal = false
this._deleteOk(this.sampleId) this._deleteOk(this.sampleId)
this.$emit('on-result-change') this.$emit('on-result-change')
this.$refs.footerList._hideLoading()
} }
}, },
_copyHisSample() { _copyHisSample() {
......
...@@ -9,13 +9,10 @@ ...@@ -9,13 +9,10 @@
<Row> <Row>
<!--查询--> <!--查询-->
<!--操作--> <!--操作-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" @on-result-change="_btnClick" class="contHide" show-search-btn="true"></btn-list>
</Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true" <PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange" select-data> :get-page="getPage" :hide-page="true" @on-result-change="_tableResultChange" select-data>
<vxe-table-column <vxe-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
:key="item.key" :key="item.key"
...@@ -62,11 +59,11 @@ export default { ...@@ -62,11 +59,11 @@ export default {
formId: 'soilSampleManage', formId: 'soilSampleManage',
currentComponent: '', currentComponent: '',
btn: [ btn: [
{ // {
type: 'success', // type: 'success',
id: '', // id: '',
name: '保存' // name: '保存'
} // }
// { // {
// type: 'success', // type: 'success',
// id: '', // id: '',
...@@ -85,7 +82,7 @@ export default { ...@@ -85,7 +82,7 @@ export default {
currentRow: '', currentRow: '',
footerList: [ footerList: [
{ id: '', name: '取消', type: '' }, { id: '', name: '取消', type: '' },
{ id: '', name: '关闭', type: 'primary' } { id: '', name: '保存', type: 'primary' }
], ],
iconMsg: [ iconMsg: [
{ {
...@@ -165,8 +162,8 @@ export default { ...@@ -165,8 +162,8 @@ export default {
case '取消': case '取消':
this._cancel() this._cancel()
break break
case '关闭': case '保存':
this._cancel() this._save()
break break
} }
}, },
...@@ -213,6 +210,7 @@ export default { ...@@ -213,6 +210,7 @@ export default {
// this._deleteOk(this.sampleId) // this._deleteOk(this.sampleId)
this.showModal = false this.showModal = false
this.$emit('on-result-change') this.$emit('on-result-change')
this.$refs.footerList._hideLoading()
} }
}, },
_copyHisSample() { _copyHisSample() {
......
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