修改问题

master
sunzehua 1 year ago
parent 9097eddea2
commit cb74b987f0

@ -325,6 +325,8 @@
/> />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item <a-form-model-item
label="辅助字段3" label="辅助字段3"

@ -11,9 +11,9 @@
<a-col <a-col
:md="6" :md="6"
:lg="6" :lg="6"
:xl="4" :xl="!advanced?3:4"
:key="findex" :key="findex"
v-show="(findex < 4 && !advanced) || advanced" v-show="(findex < 6 && !advanced) || advanced"
class="from-label"> class="from-label">
<a-form-item style="padding-left: 10px; padding-right: 10px" :label="formLabel.title"> <a-form-item style="padding-left: 10px; padding-right: 10px" :label="formLabel.title">
<formLabel <formLabel
@ -29,7 +29,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</template> </template>
<a-col :xl="formBtnCol || (!advanced && 8)" :lg="24" :md="24" :sm="24"> <a-col style="padding: 0px;" :xl="!advanced?6:8" :lg="24" :md="24" :sm="24">
<span <span
class="table-page-search-submitButtons" class="table-page-search-submitButtons"
:style="(advanced && { float: 'right', overflow: 'hidden' }) || {}"> :style="(advanced && { float: 'right', overflow: 'hidden' }) || {}">
@ -349,20 +349,34 @@
</template> </template>
<template #dzRemark="{ row }"> <template #dzRemark="{ row }">
<div > <a-spin :spinning="row.dzmarkLoading">
<a-popover placement="topLeft" :content="row.dzRemark"> <a-popover placement="topLeft">
<a-icon style="cursor: pointer;" @click="handleOpenMark(row,1)" type="edit" /> <template slot="content">
{{ row.dzRemark }} {{ row.dzRemark }}
</a-popover> </template>
<div style="display: flex;align-items: center;">
<a-input @blur="getBlurMark(row,1)" @focus="getFocusMark(row,1)" style="margin-top: 0px;" v-model="row.dzRemark" default-value="mysite">
</a-input>
<a-icon v-show="row.rowDzMark" style="cursor: pointer;margin-left: 5px;color:#36cfc9;" @mousedown.native="handleSaveMark(row,1)" type="check-circle" theme="filled" />
</div> </div>
</a-popover>
</a-spin>
</template> </template>
<template #czRemark="{ row }"> <template #czRemark="{ row }">
<div > <div >
<a-popover placement="topLeft" :content="row.czRemark"> <a-spin :spinning="row.czmarkLoading">
<a-icon style="cursor: pointer;" @click="handleOpenMark(row,2)" type="edit" /> <a-popover placement="topLeft">
<template slot="content">
{{ row.czRemark }} {{ row.czRemark }}
</template>
<div style="display: flex;align-items: center;">
<a-input @blur="getBlurMark(row,2)" @focus="getFocusMark(row,2)" style="margin-top: 0px;" v-model="row.czRemark" default-value="mysite">
</a-input>
<a-icon v-show="row.rowCzMark" style="cursor: pointer;margin-left: 5px;color:#36cfc9;" @mousedown.native="handleSaveMark(row,2)" type="check-circle" theme="filled" />
</div>
</a-popover> </a-popover>
</a-spin>
</div> </div>
</template> </template>
@ -764,23 +778,6 @@
</a-form> </a-form>
</a-modal> </a-modal>
<a-modal :title="marktitle" :visible="markFlag" >
<div style="margin-top:20px">
<a-input v-if="marktitle==='操作备注'" v-model="editRowData.czRemark"></a-input>
<a-input v-if="marktitle==='单证备注'" v-model="editRowData.dzRemark"></a-input>
</div>
<template slot="footer">
<a-button key="back" @click="markFlag = false">取消</a-button>
<a-popconfirm
title="确定修改吗"
ok-text="是"
cancel-text="否"
@confirm="handleSaveMark(editRowData)"
>
<a-button key="submit" type="primary" :loading="markLoading" >确定</a-button>
</a-popconfirm>
</template>
</a-modal>
</a-spin> </a-spin>
</div> </div>
</template> </template>
@ -848,7 +845,6 @@ export default {
spinning: false, spinning: false,
isUpload: false, isUpload: false,
markFlag: false, markFlag: false,
markLoading: false,
marktitle: '', marktitle: '',
refshYZloading: false, refshYZloading: false,
nowFirst: false, nowFirst: false,
@ -2012,6 +2008,10 @@ export default {
item.bookstatus = bookstatus item.bookstatus = bookstatus
item.refshYzitemLoad = false item.refshYzitemLoad = false
item.atdLoading = false item.atdLoading = false
item.rowDzMark = false
item.rowCzMark = false
item.czmarkLoading = false
item.dzmarkLoading = false
let hasGoods = 0 let hasGoods = 0
item.goodsStatusList.map((gitem, gindex) => { item.goodsStatusList.map((gitem, gindex) => {
if (gitem.finishTime || gitem.remark) { if (gitem.finishTime || gitem.remark) {
@ -2104,23 +2104,26 @@ export default {
addCancel() { addCancel() {
this.addVisible = false this.addVisible = false
}, },
handleSaveMark(row) { handleSaveMark(row, type) {
const data = { const data = {
id: row.id, id: row.id,
czRemark: row.czRemark, czRemark: row.czRemark,
dzRemark: row.dzRemark dzRemark: row.dzRemark
} }
this.markLoading = true if (type === 1) {
row.dzmarkLoading = true
} else {
row.czmarkLoading = true
}
SaveInList(data).then(res => { SaveInList(data).then(res => {
if (res.success) { if (res.success) {
this.$message.success('修改成功') this.$message.success('修改成功')
this.markFlag = false row.dzmarkLoading = false
this.editRow.czRemark = row.czRemark row.czmarkLoading = false
this.editRow.dzRemark = row.dzRemark
this.markLoading = false
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
this.markLoading = false row.dzmarkLoading = false
row.czmarkLoading = false
} }
}) })
}, },
@ -2200,6 +2203,20 @@ export default {
pressEnterFun() { pressEnterFun() {
this.tableRefresh() this.tableRefresh()
}, },
getFocusMark(row, type) {
if (type === 1) {
row.rowDzMark = true
} else {
row.rowCzMark = true
}
},
getBlurMark(row, type) {
if (type === 1) {
row.rowDzMark = false
} else {
row.rowCzMark = false
}
},
remarkhover(e, data) { remarkhover(e, data) {
if (data.bookremark.length > 0) { if (data.bookremark.length > 0) {
const maxWidth = window.innerWidth const maxWidth = window.innerWidth

@ -251,16 +251,26 @@
<vxe-input v-model="row.addr" type="text"></vxe-input> <vxe-input v-model="row.addr" type="text"></vxe-input>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="contactName" title="联系人" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="row.contactName" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column field="contactTel" title="联系电话" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="row.contactTel" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column field="addrName" title="地址简称" :edit-render="{}"> <vxe-column field="addrName" title="地址简称" :edit-render="{}">
<template #edit="{ row }"> <template #edit="{ row }">
<vxe-input v-model="row.addrName" type="text"></vxe-input> <vxe-input v-model="row.addrName" type="text"></vxe-input>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="addrType" title="地址类型" :edit-render="{}"> <vxe-column width="150" field="addrType" title="地址类型" :edit-render="{}">
<template #default="{ row }"> <template #default="{ row }">
<span v-if="row.addrType==='factory'"></span> <span v-if="row.addrType==='factory'"></span>
</template> </template>
<template #edit="{ row }"> <template width="150" #edit="{ row }">
<vxe-select clearable v-model="row.addrType" transfer> <vxe-select clearable v-model="row.addrType" transfer>
<vxe-option value="factory" label="工厂地址"></vxe-option> <vxe-option value="factory" label="工厂地址"></vxe-option>
</vxe-select> </vxe-select>

@ -250,12 +250,22 @@
<vxe-input v-model="row.addr" type="text"></vxe-input> <vxe-input v-model="row.addr" type="text"></vxe-input>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column width="200" field="addrName" title="地址简称" :edit-render="{}"> <vxe-column field="contactName" title="联系人" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="row.contactName" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column field="contactTel" title="联系电话" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="row.contactTel" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column width="150" field="addrName" title="地址简称" :edit-render="{}">
<template #edit="{ row }"> <template #edit="{ row }">
<vxe-input v-model="row.addrName" type="text"></vxe-input> <vxe-input v-model="row.addrName" type="text"></vxe-input>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column width="200" field="addrType" title="地址类型" :edit-render="{}"> <vxe-column width="150" field="addrType" title="地址类型" :edit-render="{}">
<template #default="{ row }"> <template #default="{ row }">
<span v-if="row.addrType==='factory'"></span> <span v-if="row.addrType==='factory'"></span>
</template> </template>

@ -604,7 +604,7 @@
</div> </div>
</a-spin> </a-spin>
</a-modal> </a-modal>
<a-modal :footer="null" width="800px" :maskClosable="false" v-model="addrsFlag" title="选择地址"> <a-modal :footer="null" width="1000px" :maskClosable="false" v-model="addrsFlag" title="选择地址">
<a-table :pagination="false" :columns="columns" :data-source="addrList"> <a-table :pagination="false" :columns="columns" :data-source="addrList">
<template slot="action" slot-scope="text,record"> <template slot="action" slot-scope="text,record">
<span> <span>
@ -666,6 +666,20 @@ export default {
width: 250, width: 250,
title: '详细地址' title: '详细地址'
}, },
{
dataIndex: 'contactName',
key: 'contactName',
ellipsis: true,
width: 250,
title: '联系人'
},
{
dataIndex: 'contactTel',
key: 'contactTel',
ellipsis: true,
width: 250,
title: '联系电话'
},
{ {
dataIndex: 'action', dataIndex: 'action',
key: 'action', key: 'action',
@ -834,9 +848,6 @@ export default {
if (item.addrs && item.addrs.length > 0) { if (item.addrs && item.addrs.length > 0) {
this.addrsFlag = true this.addrsFlag = true
this.addrList = item.addrs this.addrList = item.addrs
const chief = item.chief ? item.chief : ''
const tel = item.tel ? item.tel : ''
this.form.setFieldsValue({ factoryContact: chief + tel })
} else { } else {
const chief = item.chief ? item.chief : '' const chief = item.chief ? item.chief : ''
const fullNameEN = item.fullNameEN ? item.fullNameEN : '' const fullNameEN = item.fullNameEN ? item.fullNameEN : ''
@ -852,7 +863,9 @@ export default {
}, },
handleSelect(row) { handleSelect(row) {
this.addrsFlag = false this.addrsFlag = false
this.form.setFieldsValue({ factoryAddr: row.addr }) const contactName = row.contactName ? row.contactName : ''
const contactTel = row.contactTel ? row.contactTel : ''
this.form.setFieldsValue({ factoryAddr: row.addr, factoryContact: contactName + contactTel })
}, },
GetPrintData(cateCode, printType) { GetPrintData(cateCode, printType) {
const Data = { const Data = {

Loading…
Cancel
Save