Commit 663af0c8 by lichengming

修改了合同登记添加编辑

parent 003e31d8
...@@ -121,6 +121,7 @@ export default { ...@@ -121,6 +121,7 @@ export default {
{ title: '名称', key: 'name', width: 160 }, { title: '名称', key: 'name', width: 160 },
{ title: '型号', key: 'spec' }, { title: '型号', key: 'spec' },
{ title: '数量', key: 'quantity' }, { title: '数量', key: 'quantity' },
{ title: '检测依据', key: 'verification' },
{ title: '技术参数', key: 'technicalParameter' }, { title: '技术参数', key: 'technicalParameter' },
{ title: '生产厂家', key: 'manufacturer' }, { title: '生产厂家', key: 'manufacturer' },
{ title: '出厂编号', key: 'factoryNumber' }, { title: '出厂编号', key: 'factoryNumber' },
......
...@@ -95,7 +95,8 @@ export default { ...@@ -95,7 +95,8 @@ export default {
pageColumns: [ pageColumns: [
{ title: '样品名称', key: 'name' }, { title: '样品名称', key: 'name' },
{ title: '检定依据', key: 'code' }, { title: '检定依据', key: 'code' },
{ title: '检定依据名称', key: 'basis' } { title: '检定依据名称', key: 'basis' },
{ title: '单价', key: 'price' }
], ],
getPage: [], getPage: [],
showUserGroupModal: false, showUserGroupModal: false,
......
...@@ -111,14 +111,31 @@ ...@@ -111,14 +111,31 @@
</Option> </Option>
</Select> </Select>
</div> </div>
<div v-else-if="item.key==='quantity'" @click.stop="_handleRow(scope)"> <div v-if="item.key==='lastTime'" @click.stop="_handleRow(scope)">
<Date-picker v-model="scope.row.lastTime" type="date" split-panels style="width:100%;"
placeholder="请选择上次检定时间"></Date-picker>
</div>
<div v-if="item.key==='price'" @click.stop="_handleRow(scope)" >
<el-input
v-model="scope.row.price"
@input="_quantityChange(scope.$rowIndex)"
@keydown.native="channelInputLimit"
type="number"
/>
</div>
<div v-else-if="item.key==='quantity'" @click.stop="_handleRow(scope)" >
<el-input <el-input
v-model="scope.row.quantity" v-model="scope.row.quantity"
@input="_quantityChange(scope.$rowIndex)"
@keydown.native="channelInputLimit"
type="number" type="number"
placeholder="请输入或选择数量" placeholder="请输入或选择数量"
@keydown.native="channelInputLimit"
/> />
</div> </div>
<div v-if="item.key==='unit'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.unit" blur placeholder="请输入收费单位"
></el-input>
</div>
<div v-else-if="item.date"> <div v-else-if="item.date">
{{ scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):'' }} {{ scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):'' }}
</div> </div>
...@@ -353,6 +370,18 @@ export default { ...@@ -353,6 +370,18 @@ export default {
// ) // )
// }, // },
methods: { methods: {
_quantityChange(index) {
this.$forceUpdate()
this.index = index
if (
undefined !== this.getPage.records[this.index].price &&
undefined !== this.getPage.records[this.index].quantity
) {
this.getPage.records[this.index].totalPrice =
this.getPage.records[this.index].quantity *
this.getPage.records[this.index].price
}
},
_cusNameChange(msg, data) { _cusNameChange(msg, data) {
// this.financeObj = {} // 清空维护发票信息的数据 // this.financeObj = {} // 清空维护发票信息的数据
if (this.$string(this.id).isEmpty()) { if (this.$string(this.id).isEmpty()) {
...@@ -429,6 +458,7 @@ export default { ...@@ -429,6 +458,7 @@ export default {
this.getPage.records[this.index].verification = this.getPage.records[this.index].verification =
(undefined === data.code ? '' : data.code) + (undefined === data.code ? '' : data.code) +
(undefined === data.basis ? '' : data.basis) (undefined === data.basis ? '' : data.basis)
this.getPage.records[this.index].price = data.price
console.log('返回的数据') console.log('返回的数据')
console.log(data) console.log(data)
console.log(this.getPage.records) console.log(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