Commit a14b4d5c by liuliufashi

update

parent e81207ea
...@@ -285,10 +285,10 @@ const onSelectPlain = (e: any) => { ...@@ -285,10 +285,10 @@ const onSelectPlain = (e: any) => {
}; };
const handleChanges = async(value: string) => { const handleChanges = async(value: any) => {
const uid = getUid(); const uid = getUid();
const params = { const params = {
name: value?value:'', name: value.target?'':value,
size:10, size:10,
page:1, page:1,
uid, uid,
......
...@@ -389,7 +389,7 @@ const init = async () => { ...@@ -389,7 +389,7 @@ const init = async () => {
uid, uid,
} }
const data = await onSelectGoods(prarms); const data = await onSelectGoods(prarms);
list.value = data.data; list.value = data.data.goods;
}; };
const textChange = (e: any) => { const textChange = (e: any) => {
textarea.value = e textarea.value = e
......
...@@ -70,7 +70,7 @@ const indexItem = ref<any>(0) ...@@ -70,7 +70,7 @@ const indexItem = ref<any>(0)
const selectedKeys = ref<string[]>(["1"]) const selectedKeys = ref<string[]>(["1"])
const info = reactive<FormUser>(store.getters.getUserInfo); const info = reactive<FormUser>(store.getters.getUserInfo);
const goNewPage = (e: any,index:any) => { const goNewPage = (e: any,index:any) => {
indexItem.value = index // indexItem.value = index
const { path } = e; const { path } = e;
router.push({ router.push({
path, path,
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
<a-form-item label="选择商品" name="subject" :rules="rulesRef.subject" :label-col="{ span: 2 }" <a-form-item label="选择商品" name="subject" :rules="rulesRef.subject" :label-col="{ span: 2 }"
labelAlign="left"> labelAlign="left">
<div style="width:100%;display: flex;align-items: center;"> <div style="width:100%;display: flex;align-items: center;">
<a-select v-model:value="formState.subject" :default-active-first-option="false" mode="multiple" style="width: 100%" placeholder="请选择商品" @focus="onSubSearch" @search="onSubSearch" @select="onSelectss" @popupScroll="popupScroll"> <a-select v-model:value="formState.subject" :default-active-first-option="false" mode="multiple" style="width: 100%" placeholder="请选择商品" @search="onSubSearch" @select="onSelectss" @popupScroll="popupScroll">
<a-select-option v-for="item,index in optionss" :itemKey="item" :value="item.goodsid" :label="index" > <a-select-option v-for="item,index in optionss.list" :itemKey="item" :value="item.goodsid" :label="index" >
{{item.subject}} {{item.subject}}
</a-select-option> </a-select-option>
</a-select> </a-select>
</div> </div>
...@@ -59,12 +59,12 @@ ...@@ -59,12 +59,12 @@
<a-date-picker v-model:value="formState.starttime" :locale="locale" :format="dateFormat" :disabledDate="disabledDate"/> <a-time-picker style="margin-left:10px;" v-model:value="startvalue" format="HH:mm" /> <a-date-picker v-model:value="formState.starttime" :locale="locale" :format="dateFormat" :disabledDate="disabledDate"/> <a-time-picker style="margin-left:10px;" v-model:value="startvalue" format="HH:mm" />
</div> </div>
</a-form-item> --> </a-form-item> -->
<a-form-item label="结束时间" name="price" :label-col="{ span: 2 }" <!-- <a-form-item label="结束时间" name="price" :label-col="{ span: 2 }"
labelAlign="left"> labelAlign="left">
<div style="display:flex"> <div style="display:flex">
<a-date-picker v-model:value="formState.expireendtime" :locale="locale" :format="dateFormat" :disabledDate="disabledDate"/> <a-time-picker style="margin-left:10px;" v-model:value="endvalue" format="HH:mm" /> <a-date-picker v-model:value="formState.expireendtime" :locale="locale" :format="dateFormat" :disabledDate="disabledDate"/> <a-time-picker style="margin-left:10px;" v-model:value="endvalue" format="HH:mm" />
</div> </div>
</a-form-item> </a-form-item> -->
<a-form-item label="信息备注" name="price" :label-col="{ span: 2 }" <a-form-item label="信息备注" name="price" :label-col="{ span: 2 }"
labelAlign="left"> labelAlign="left">
<div style="display:flex"> <div style="display:flex">
...@@ -126,7 +126,9 @@ let formState = ref<FormState>({ ...@@ -126,7 +126,9 @@ let formState = ref<FormState>({
}); });
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const list = ref<any>([]) const list = ref<any>([])
const optionss = ref<any>([]) let optionss = reactive<any>({
list:[]
})
let goodspayditch = ref<any>([]) let goodspayditch = ref<any>([])
const props = defineProps(); const props = defineProps();
const dateFormat = 'YYYY/MM/DD'; const dateFormat = 'YYYY/MM/DD';
...@@ -226,15 +228,18 @@ const popupScroll = ()=>{ ...@@ -226,15 +228,18 @@ const popupScroll = ()=>{
console.log(1); console.log(1);
} }
const onSubSearch = async(value:any)=>{ const onSubSearch = async(value:any)=>{
optionss.list=[]
const uid = getUid(); const uid = getUid();
const params = { const params = {
name: value?value:'', name: value.target?'':value,
page:1, page:1,
size:10, size:10,
uid, uid,
}; };
const data = await onFindbyLikeName(params); const data = await onFindbyLikeName(params);
optionss.value = data.data.goods optionss.list= data.data.goods
} }
const onSelectCheckboxValue = async(e:any,index:any)=>{ const onSelectCheckboxValue = async(e:any,index:any)=>{
index = index+1 index = index+1
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
autocomplete="off" > autocomplete="off" >
<a-form-item label="选择商品" name="subject" :label-col="{ span: 2 }" labelAlign="left"> <a-form-item label="选择商品" name="subject" :label-col="{ span: 2 }" labelAlign="left">
<div style="width:100%;display: flex;align-items: center;"> <div style="width:100%;display: flex;align-items: center;">
<a-select v-model:value="formState.subject" :default-active-first-option="false" mode="multiple" style="width: 100%" placeholder="请选择商品" @focus="onSubSearch" @search="onSubSearch" @select="onSelect" @popupScroll="popupScroll"> <a-select v-model:value="formState.subject" mode="multiple" style="width: 100%" placeholder="请选择商品" @focus="onSubSearch" @search="onSubSearch" @select="onSelect" @popupScroll="popupScroll">
<a-select-option v-for="item,index in listArray" :itemKey="item" :value="item.goodsid" :label="index" > <a-select-option v-for="item,index in listArray" :itemKey="item" :value="item.goodsid" :label="index" >
<span>{{item.subject}}</span> <span>{{item.subject}}</span>
</a-select-option> </a-select-option>
...@@ -312,7 +312,7 @@ const onSelect =(e:any,opt:any)=>{ ...@@ -312,7 +312,7 @@ const onSelect =(e:any,opt:any)=>{
const onSubSearch = async(value:any)=>{ const onSubSearch = async(value:any)=>{
const uid = getUid(); const uid = getUid();
const params = { const params = {
name: value?value:'', name: value.target?'':value,
size:10, size:10,
page:1, page:1,
uid, uid,
......
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