Browse Source

修改字典表

zs 1 năm trước cách đây
mục cha
commit
665488abad

+ 5 - 11
src/views/goods/index.vue

@@ -9,7 +9,8 @@
           <cButton @toAdd="toAdd()"> </cButton>
         </el-col>
         <el-col :span="24" class="thr">
-          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @spec="toSpec" @edit="toEdit" @del="toDel"> </cTable>
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @spec="toSpec"
+            @edit="toEdit" @del="toDel"> </cTable>
         </el-col>
       </el-col>
     </el-row>
@@ -18,15 +19,8 @@
         <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
           <cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="onSubmit">
             <template #file>
-              <cUpload
-                :model="`${'file'}`"
-                :limit="6"
-                listType="picture"
-                url="/files/material/goods/upload"
-                accept="*"
-                :list="form.file"
-                @change="onUpload"
-              ></cUpload>
+              <cUpload :model="`${'file'}`" :limit="6" listType="picture" url="/files/material/goods/upload" accept="*"
+                :list="form.file" @change="onUpload"></cUpload>
             </template>
             <template #supplier_id>
               <el-option v-for="i in supplierList" :key="i._id" :label="i.name" :value="i._id"></el-option>
@@ -199,7 +193,7 @@ const toClose = () => {
 // 查询其他信息
 const searchOther = async () => {
   let res: IQueryResult;
-  res = await dictAxios.query({ type: 'goods_type' });
+  res = await dictAxios.query({ type: 'goods_type', is_use: '0' });
   if (res.errcode == 0) typeList.value = res.data;
   res = await dictAxios.query({ type: 'is_use' });
   if (res.errcode == 0) is_useList.value = res.data;

+ 1 - 1
src/views/order/index.vue

@@ -121,7 +121,7 @@ const toClose = () => {
 const searchOther = async () => {
   let res: IQueryResult;
   // 状态
-  res = await dictData.query({ type: 'order_status' });
+  res = await dictData.query({ type: 'order_status', is_use: '0' });
   if (res.errcode == '0') statusList.value = res.data;
 };
 </script>

+ 5 - 11
src/views/spec/index.vue

@@ -13,7 +13,8 @@
           </cButton>
         </el-col>
         <el-col :span="24" class="thr">
-          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @edit="toEdit" @del="toDel"> </cTable>
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @edit="toEdit" @del="toDel">
+          </cTable>
         </el-col>
       </el-col>
     </el-row>
@@ -22,15 +23,8 @@
         <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
           <cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="toSave">
             <template #file>
-              <cUpload
-                :model="`${'file'}`"
-                :limit="6"
-                listType="picture"
-                url="/files/material/specs/upload"
-                accept="*"
-                :list="form.file"
-                @change="onUpload"
-              ></cUpload>
+              <cUpload :model="`${'file'}`" :limit="6" listType="picture" url="/files/material/specs/upload" accept="*"
+                :list="form.file" @change="onUpload"></cUpload>
             </template>
             <template #is_use>
               <el-radio v-for="i in is_useList" :key="i._id" :label="i.value">{{ i.label }}</el-radio>
@@ -174,7 +168,7 @@ const toClose = () => {
 const searchOther = async () => {
   let res: IQueryResult;
   // 是否使用
-  res = await dictData.query({ type: 'is_use' });
+  res = await dictData.query({ type: 'is_use', is_use: '0' });
   if (res.errcode == '0') is_useList.value = res.data;
 };
 // 返回上一页

+ 6 - 12
src/views/system/module/index.vue

@@ -9,7 +9,8 @@
           <cButton @toAdd="toAdd()"> </cButton>
         </el-col>
         <el-col :span="24" class="thr">
-          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @edit="toEdit" @del="toDel"> </cTable>
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @edit="toEdit" @del="toDel">
+          </cTable>
         </el-col>
       </el-col>
     </el-row>
@@ -18,15 +19,8 @@
         <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
           <cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="toSave">
             <template #url>
-              <cUpload
-                :model="`${'url'}`"
-                :limit="1"
-                listType="picture"
-                url="/files/material/module/upload"
-                accept="*"
-                :list="form.url"
-                @change="onUpload"
-              ></cUpload>
+              <cUpload :model="`${'url'}`" :limit="1" listType="picture" url="/files/material/module/upload" accept="*"
+                :list="form.url" @change="onUpload"></cUpload>
             </template>
             <template #type>
               <el-option v-for="i in typeList" :key="i.value" :label="i.label" :value="i.value"></el-option>
@@ -175,10 +169,10 @@ const toClose = () => {
 const searchOther = async () => {
   let res: IQueryResult;
   // 是否使用
-  res = await dictData.query({ type: 'is_use' });
+  res = await dictData.query({ type: 'is_use', is_use: '0' });
   if (res.errcode == '0') is_useList.value = res.data;
   // 类型
-  res = await dictData.query({ type: 'goods_type' });
+  res = await dictData.query({ type: 'goods_type', is_use: '0' });
   if (res.errcode == '0') typeList.value = res.data;
 };
 </script>