Merge remote-tracking branch 'origin/master'

zhc4dev
lenovo 2 years ago
commit 8b1d7c96cb
  1. 14
      ant-design-vue-jeecg/src/views/customershoppingcart/admin/CustomerShoppingCartList.vue
  2. 8
      ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/ZyGoodsForm.vue
  3. 62
      ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/ZyGoodsModal.vue

@ -115,17 +115,15 @@
总计<span style="color: red;font-size: 20px">{{ totalPrice }}</span 总计<span style="color: red;font-size: 20px">{{ totalPrice }}</span
> >
</div> </div>
</div> </div>
<!-- <zy-goods-form ref="ZyGoodsForm" @ok="modalFormOk"></zy-goods-form>--> <zy-goods-modal ref="zygoodsForm" @ok="modalFormOk"></zy-goods-modal>
<customer-shopping-cart-modal ref="modalForm" @ok="modalFormOk"></customer-shopping-cart-modal> <customer-shopping-cart-modal ref="modalForm" @ok="modalFormOk"></customer-shopping-cart-modal>
</a-card> </a-card>
</template> </template>
<script> <script>
import ZyGoodsForm from './modules/ZyGoodsForm' import ZyGoodsModal from './modules/ZyGoodsModal'
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin' import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
@ -138,7 +136,7 @@
mixins:[JeecgListMixin, mixinDevice], mixins:[JeecgListMixin, mixinDevice],
components: { components: {
CustomerShoppingCartModal, CustomerShoppingCartModal,
ZyGoodsForm ZyGoodsModal
}, },
data () { data () {
return { return {
@ -240,9 +238,9 @@
}, },
methods: { methods: {
spxq(record){ spxq(record){
this.$ref.ZyGoodsForm.edit(record); this.$refs.zygoodsForm.edit(record);
this.$ref.ZyGoodsForm.title = "测试页面"; this.$refs.zygoodsForm.title = "商品详情";
this.$ref.ZyGoodsForm.disableSubmit = false; this.$refs.zygoodsForm.disableSubmit = true;
}, },
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {

@ -232,8 +232,12 @@
this.edit(this.modelDefault); this.edit(this.modelDefault);
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); getAction(this.url.queryById, {id:record.goodsId}).then((res) => {
this.visible = true; this.model = res.result;
this.visible = true;
});
/* this.model = Object.assign({}, record);
this.visible = true;*/
}, },
submitForm () { submitForm () {
const that = this; const that = this;

@ -0,0 +1,62 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-goods-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-goods-form>
</j-modal>
</template>
<script>
import ZyGoodsForm from './ZyGoodsForm'
export default {
name: 'ZyGoodsModal',
components: {
ZyGoodsForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
console.log("----------------")
console.log(record)
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
Loading…
Cancel
Save