Kaynağa Gözat

各个模块样式修改

asd26269546 2 yıl önce
ebeveyn
işleme
6723603253

+ 64 - 32
src/assets/css/index.scss

@@ -16,11 +16,11 @@ li {
     margin: 0;
 }
 
-.cl-blue{
+.cl-blue {
     color: #0084ff;
 }
 
-.cl-green{
+.cl-green {
     color: #34C724;
 }
 
@@ -90,38 +90,39 @@ li {
     border-bottom: 1px solid #e5e5e5;
     padding: 10px 0;
     margin-bottom: 6px;
-    .common-form-text-item{
-        
-    }
-    .common-form-text-item-value{
+
+    .common-form-text-item {}
+
+    .common-form-text-item-value {
         color: #333333;
         font-size: 16px;
         font-weight: 500;
     }
 }
 
-.border-btm{
+.border-btm {
     border-bottom: 1px solid #ddd;
 }
 
 
-.common-mobile-table{
+.common-mobile-table {
     width: 100%;
     border-collapse: collapse;
     border-spacing: 0;
-    
-    table{
+
+    table {
         width: 100%;
         border-collapse: collapse;
         border-spacing: 0;
         text-align: center;
-        th{
+
+        th {
             background-color: #F1F1F1;
             color: #666666;
             padding: 15px 0;
         }
 
-        td{
+        td {
             border-bottom: 1px solid #ddd;
             padding: 15px 0;
             color: #333333;
@@ -130,39 +131,44 @@ li {
 }
 
 
-.common-steps{
-    .label{
+.common-steps {
+    .label {
         height: 28px;
         line-height: 28px;
         font-size: 14px;
-        .name{
+
+        .name {
             color: #333333;
             font-weight: bold;
         }
-        .tip{
+
+        .tip {
             color: #999999;
             font-size: 12px;
             margin-left: 8px;
         }
-        .state{
+
+        .state {
             float: right;
             font-weight: 500;
         }
-        
+
     }
-    .content{
+
+    .content {
         padding: 14px 12px;
         background: #F1F1F1;
         color: #666;
         border-radius: 4px;
     }
-    p{
+
+    p {
         font-size: 12px;
         color: #999;
     }
 }
 
-.van-field--label-top .van-icon-arrow{
+.van-field--label-top .van-icon-arrow {
     position: absolute;
     right: 10px;
     top: 0;
@@ -170,26 +176,52 @@ li {
     line-height: 70px;
 }
 
-.commons-item-title-delete{
+.commons-item-title-delete {
     background-color: #f2f2f2;
     height: 30px;
     line-height: 30px;
-    padding: 0 10px!important;
+    padding: 0 10px !important;
     margin: 0 10px;
-    .delete{
-        width: 30px!important;
+
+    .delete {
+        width: 30px !important;
         font-size: 12px;
-        
+
     }
 }
 
-.van-cell-group--inset{
-    margin: 0!important;
-    border-radius:0!important;
+.van-cell-group--inset {
+    margin: 0 !important;
+    border-radius: 0 !important;
 }
 
-.van-form{
-    margin-top: 6px!important;
-    border:0!important;
+.van-form {
+    margin-top: 6px !important;
+    border: 0 !important;
 }
 
+
+.commons-delete {
+    display: flex!important;
+    padding: 5px 15px!important;
+    justify-content: space-between!important;
+    align-items: center!important;
+    color: #999999!important;
+    background-color: #f2f2f2;
+
+    .title {
+        flex: 1!important;
+    }
+
+    .delete {
+        width: 20px!important;
+        cursor: pointer!important;
+        text-align: center!important;
+    }
+}
+
+.commons-add-btn{
+    button{
+        border:none!important;
+    }
+}

+ 2 - 2
src/utils/axios.js

@@ -12,8 +12,8 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
-  //baseURL: 'test-api',
-  baseURL: 'prod-api',
+  baseURL: 'test-api',
+  //baseURL: 'prod-api',
   // 超时
   timeout: 10000
 })

+ 6 - 5
src/views/MES/produceManage/reportWork/add.vue

@@ -41,7 +41,7 @@
         v-for="(item, index) in formData.productionReportingDetailList"
         :key="index"
       >
-        <div class="row">
+        <div class="commons-delete">
           <div class="title">明细{{ index + 1 }}</div>
           <div
             class="delete"
@@ -90,13 +90,14 @@
         />
       </van-popup>
 
-      <div style="text-align: center; line-height: 28px" v-if="!route.query.id">
+      <div class="commons-add-btn"  v-if="!route.query.id">
         <van-button
           icon="plus"
-          type="primary"
-          plain
-          size="mini"
+          type="default"
+          
+          size="small"
           style="margin-top: 10px"
+          block
           @click="handleAddRow"
           >添加明细</van-button
         >

+ 5 - 4
src/views/procurementManagement/priceConfig/add.vue

@@ -66,13 +66,14 @@
           </van-popup>
         </van-cell-group>
   
-        <div style="text-align: center; line-height: 28px" v-if="!route.query.id">
+        <div class="commons-add-btn"  v-if="!route.query.id">
           <van-button
             icon="plus"
-            type="primary"
-            plain
-            size="mini"
+            type="default"
+            
+            size="small"
             style="margin-top: 10px"
+            block
             @click="handleAddRow"
             >添加明细</van-button
           >

+ 10 - 12
src/views/procurementManagement/subscribe/add.vue

@@ -74,7 +74,7 @@
 				v-for="(item, index) in formData.subscribeDetailList"
 				:key="index"
 			>
-				<div class="row">
+				<div class="commons-delete">
 					<div class="title">明细{{ index + 1 }}</div>
 					<div
 						class="delete"
@@ -132,18 +132,16 @@
 				/>
 			</van-popup>
 
-			<div
-				style="text-align: center; line-height: 28px"
-				v-if="!route.query.id"
-			>
+			<div class="commons-add-btn"  v-if="!route.query.id">
 				<van-button
-					icon="plus"
-					type="primary"
-					plain
-					size="mini"
-					style="margin-top: 10px"
-					@click="handleAddRow"
-					>添加明细</van-button
+				icon="plus"
+				type="default"
+				
+				size="small"
+				style="margin-top: 10px"
+				block
+				@click="handleAddRow"
+				>添加明细</van-button
 				>
 			</div>
 

+ 1 - 10
src/views/procurementManagement/supplierConfig/add.vue

@@ -89,16 +89,7 @@ const typeList = ref([
 		value: "5",
 	},
 ]);
-const unitList = ref([
-	{
-		text: "个",
-		value: "个",
-	},
-	{
-		text: "双",
-		value: "双",
-	},
-]);
+
 const formData = ref({
 	id: null,
 	definition: "2",

+ 24 - 13
src/views/product-material/material-library/add.vue

@@ -48,7 +48,7 @@
           :rules="[{ required: true, message: '规格型号不能为空' }]"
           required />
         <van-field
-          v-model="formData.unit"
+          v-model="formData.unitName"
           is-link
           readonly
           label="单位"
@@ -77,7 +77,7 @@
 import { ref, getCurrentInstance, onMounted } from "vue";
 import { showSuccessToast, showToast } from "vant";
 import { useRoute } from "vue-router";
-
+import { getUserInfo } from '@/utils/auth';
 const proxy = getCurrentInstance().proxy;
 const route = useRoute();
 const show = ref(false);
@@ -110,16 +110,26 @@ const typeList = ref([
     value: "5",
   },
 ]);
-const unitList = ref([
-  {
-    text: "个",
-    value: "个",
-  },
-  {
-    text: "双",
-    value: "双",
-  },
-]);
+const unitList = ref([]);
+
+const getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: getUserInfo().tenantId,
+      dictCode: "unit",
+    })
+    .then((res) => {
+      unitList.value = res.data.rows.map((item, index) => {
+        return {
+          text: item.dictValue,
+          value: item.dictKey,
+        }
+      })
+    })
+}
+getDict()
 const formData = ref({
   id: null,
   definition: "2",
@@ -142,6 +152,7 @@ const onConfirmType = ({ selectedOptions }) => {
 };
 const onConfirmUnit = ({ selectedOptions }) => {
   formData.value.unit = selectedOptions[0].value;
+  formData.value.unitName = selectedOptions[0].text;
   unitModal.value = false;
 };
 const onChange = ({ selectedOptions }) => {
@@ -270,7 +281,7 @@ onMounted(() => {
         }
         formData.value.name = resDetail.data.name;
         formData.value.spec = resDetail.data.spec;
-        formData.value.unit = resDetail.data.unit;
+        formData.value.unitName = unitList.value.filter((item) => item.value == resDetail.data.unit)[0].text;
         formData.value.remark = resDetail.data.remark;
       });
       proxy.post("/fileInfo/getList", { businessIdList: [route.query.id] }).then((res) => {

+ 136 - 83
src/views/product-material/product-library/add.vue

@@ -1,83 +1,123 @@
 <template>
-  <div class="form">
-    <van-nav-bar title="产品库" left-text="返回" left-arrow @click-left="onClickLeft"> </van-nav-bar>
-    <van-form @submit="onSubmit" label-align="top" style="margin-top: 20px; overflow-y: auto">
-      <van-cell-group inset>
-        <van-field
-          v-model="formData.productClassifyName"
-          is-link
-          readonly
-          label="产品分类"
-          placeholder="请选择产品分类"
-          @click="show = true"
-          :rules="[{ required: true, message: '产品分类不能为空' }]"
-          required />
-        <van-popup v-model:show="show" round position="bottom">
-          <van-cascader
-            title="请选择产品分类"
-            :options="classification"
-            :field-names="fieldNames"
-            @close="show = false"
-            @change="onChange"
-            @finish="onFinish" />
-        </van-popup>
-        <van-field
-          v-model="formData.typeName"
-          is-link
-          readonly
-          label="产品类型"
-          placeholder="选择产品类型"
-          @click="typeModal = true"
-          :rules="[{ required: true, message: '产品类型不能为空' }]"
-          required />
-        <van-popup v-model:show="typeModal" round position="bottom">
-          <van-picker :columns="typeList" @cancel="typeModal = false" @confirm="onConfirmType" />
-        </van-popup>
-        <van-field
-          v-model="formData.name"
-          name="产品名称"
-          label="产品名称"
-          placeholder="请填写产品名称"
-          :rules="[{ required: true, message: '产品名称不能为空' }]"
-          required />
-        <van-field
-          v-model="formData.spec"
-          name="规格型号"
-          label="规格型号"
-          placeholder="请填写规格型号"
-          :rules="[{ required: true, message: '规格型号不能为空' }]"
-          required />
-        <van-field
-          v-model="formData.unit"
-          is-link
-          readonly
-          label="单位"
-          placeholder="选择单位"
-          @click="unitModal = true"
-          :rules="[{ required: true, message: '单位不能为空' }]"
-          required />
-        <van-popup v-model:show="unitModal" round position="bottom">
-          <van-picker :columns="unitList" @cancel="unitModal = false" @confirm="onConfirmUnit" />
-        </van-popup>
-        <van-field name="uploader" label="文件上传">
-          <template #input>
-            <van-uploader v-model="fileList" :after-read="afterRead" multiple :max-count="9" :max-size="5 * 1024 * 1024" @oversize="onOversize" />
-          </template>
-        </van-field>
-        <van-field v-model="formData.remark" rows="3" type="textarea" name="备注" label="备注" placeholder="请填写备注" />
-      </van-cell-group>
-      <div style="margin: 16px">
-        <van-button round block type="primary" native-type="submit"> 提交 </van-button>
-      </div>
-    </van-form>
-  </div>
+	<div class="form">
+		<van-nav-bar
+			title="产品库"
+			left-text="返回"
+			left-arrow
+			@click-left="onClickLeft"
+		>
+		</van-nav-bar>
+		<van-form
+			@submit="onSubmit"
+			label-align="top"
+			style="margin-top: 20px; overflow-y: auto"
+		>
+			<van-cell-group inset>
+				<van-field
+					v-model="formData.productClassifyName"
+					is-link
+					readonly
+					label="产品分类"
+					placeholder="请选择产品分类"
+					@click="show = true"
+					:rules="[{ required: true, message: '产品分类不能为空' }]"
+					required
+				/>
+				<van-popup v-model:show="show" round position="bottom">
+					<van-cascader
+						title="请选择产品分类"
+						:options="classification"
+						:field-names="fieldNames"
+						@close="show = false"
+						@change="onChange"
+						@finish="onFinish"
+					/>
+				</van-popup>
+				<van-field
+					v-model="formData.typeName"
+					is-link
+					readonly
+					label="产品类型"
+					placeholder="选择产品类型"
+					@click="typeModal = true"
+					:rules="[{ required: true, message: '产品类型不能为空' }]"
+					required
+				/>
+				<van-popup v-model:show="typeModal" round position="bottom">
+					<van-picker
+						:columns="typeList"
+						@cancel="typeModal = false"
+						@confirm="onConfirmType"
+					/>
+				</van-popup>
+				<van-field
+					v-model="formData.name"
+					name="产品名称"
+					label="产品名称"
+					placeholder="请填写产品名称"
+					:rules="[{ required: true, message: '产品名称不能为空' }]"
+					required
+				/>
+				<van-field
+					v-model="formData.spec"
+					name="规格型号"
+					label="规格型号"
+					placeholder="请填写规格型号"
+					:rules="[{ required: true, message: '规格型号不能为空' }]"
+					required
+				/>
+				<van-field
+					v-model="formData.unitName"
+					is-link
+					readonly
+					label="单位"
+					placeholder="选择单位"
+					@click="unitModal = true"
+					:rules="[{ required: true, message: '单位不能为空' }]"
+					required
+				/>
+				<van-popup v-model:show="unitModal" round position="bottom">
+					<van-picker
+						:columns="unitList"
+						@cancel="unitModal = false"
+						@confirm="onConfirmUnit"
+					/>
+				</van-popup>
+				<van-field name="uploader" label="文件上传">
+					<template #input>
+						<van-uploader
+							v-model="fileList"
+							:after-read="afterRead"
+							multiple
+							:max-count="9"
+							:max-size="5 * 1024 * 1024"
+							@oversize="onOversize"
+						/>
+					</template>
+				</van-field>
+				<van-field
+					v-model="formData.remark"
+					rows="3"
+					type="textarea"
+					name="备注"
+					label="备注"
+					placeholder="请填写备注"
+				/>
+			</van-cell-group>
+			<div style="margin: 16px">
+				<van-button round block type="primary" native-type="submit">
+					提交
+				</van-button>
+			</div>
+		</van-form>
+	</div>
 </template>
 
 <script setup>
 import { ref, getCurrentInstance, onMounted } from "vue";
 import { showSuccessToast, showToast } from "vant";
 import { useRoute } from "vue-router";
-
+import { getUserInfo } from '@/utils/auth';
 const proxy = getCurrentInstance().proxy;
 const route = useRoute();
 const show = ref(false);
@@ -98,16 +138,26 @@ const typeList = ref([
     value: "2",
   },
 ]);
-const unitList = ref([
-  {
-    text: "个",
-    value: "个",
-  },
-  {
-    text: "双",
-    value: "双",
-  },
-]);
+const unitList = ref([]);
+
+const getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: getUserInfo().tenantId,
+      dictCode: "unit",
+    })
+    .then((res) => {
+      unitList.value = res.data.rows.map((item, index) => {
+        return {
+          text: item.dictValue,
+          value: item.dictKey,
+        }
+      })
+    })
+}
+getDict()
 const formData = ref({
   id: null,
   definition: "1",
@@ -130,6 +180,7 @@ const onConfirmType = ({ selectedOptions }) => {
 };
 const onConfirmUnit = ({ selectedOptions }) => {
   formData.value.unit = selectedOptions[0].value;
+   formData.value.unitName = selectedOptions[0].text;
   unitModal.value = false;
 };
 const onChange = ({ selectedOptions }) => {
@@ -260,6 +311,8 @@ onMounted(() => {
         formData.value.spec = resDetail.data.spec;
         formData.value.unit = resDetail.data.unit;
         formData.value.remark = resDetail.data.remark;
+        console.log(unitList.value.filter((item) => item.value == resDetail.data.unit))
+        formData.value.unitName = unitList.value.filter((item) => item.value == resDetail.data.unit)[0].text;
       });
       proxy.post("/fileInfo/getList", { businessIdList: [route.query.id] }).then((res) => {
         if (res.data[route.query.id] && res.data[route.query.id].length > 0) {

+ 6 - 5
src/views/purchase-sales/inbound-outbound/manualInbound/add.vue

@@ -28,7 +28,7 @@
         </van-popup>
         <!-- 明细列表 -->
         <div v-for="(item, index) in list" :key="index">
-          <div class="row">
+          <div class="commons-delete">
             <div class="title">明细{{ index + 1 }}</div>
             <div
               class="delete"
@@ -66,13 +66,14 @@
         </van-popup>
       </van-cell-group>
 
-      <div style="text-align: center; line-height: 28px" v-if="!route.query.id">
+      <div class="commons-add-btn"  v-if="!route.query.id">
         <van-button
           icon="plus"
-          type="primary"
-          plain
-          size="mini"
+          type="default"
+          
+          size="small"
           style="margin-top: 10px"
+          block
           @click="handleAddRow"
           >添加明细</van-button
         >

+ 6 - 5
src/views/purchase-sales/inbound-outbound/manualOutbound/add.vue

@@ -28,7 +28,7 @@
         </van-popup>
         <!-- 明细列表 -->
         <div v-for="(item, index) in list" :key="index">
-          <div class="row">
+          <div class="commons-delete">
             <div class="title">明细{{ index + 1 }}</div>
             <div
               class="delete"
@@ -66,13 +66,14 @@
         </van-popup>
       </van-cell-group>
 
-      <div style="text-align: center; line-height: 28px" v-if="!route.query.id">
+      <div class="commons-add-btn"  v-if="!route.query.id">
         <van-button
           icon="plus"
-          type="primary"
-          plain
-          size="mini"
+          type="default"
+          
+          size="small"
           style="margin-top: 10px"
+          block
           @click="handleAddRow"
           >添加明细</van-button
         >

+ 6 - 5
src/views/purchase-sales/inbound-outbound/transferWarehouse/add.vue

@@ -38,7 +38,7 @@
         </van-popup>
         <!-- 明细列表 -->
         <div v-for="(item, index) in list" :key="index">
-          <div class="row">
+          <div class="commons-delete">
             <div class="title">明细{{ index + 1 }}</div>
             <div
               class="delete"
@@ -76,13 +76,14 @@
         </van-popup>
       </van-cell-group>
 
-      <div style="text-align: center; line-height: 28px" v-if="!route.query.id">
+      <div class="commons-add-btn"  v-if="!route.query.id">
         <van-button
           icon="plus"
-          type="primary"
-          plain
-          size="mini"
+          type="default"
+          
+          size="small"
           style="margin-top: 10px"
+          block
           @click="handleAddRow"
           >添加明细</van-button
         >