Browse Source

硬件对接,中英文转换

asd26269546 1 year ago
parent
commit
838acc3a55
27 changed files with 468 additions and 268 deletions
  1. 10 2
      src/components/equipment-top.vue
  2. 164 3
      src/lang/cn.js
  3. 1 1
      src/lang/index.js
  4. 30 16
      src/views/equipment/assemble.vue
  5. 17 4
      src/views/equipment/index.vue
  6. 37 10
      src/views/equipment/xiamenList.vue
  7. 1 1
      src/views/main.vue
  8. 15 15
      src/views/procurementManagement/priceConfig/add.vue
  9. 10 8
      src/views/procurementManagement/priceConfig/edit.vue
  10. 5 5
      src/views/procurementManagement/priceConfig/index.vue
  11. 43 45
      src/views/procurementManagement/procureList/add.vue
  12. 6 6
      src/views/procurementManagement/procureList/index.vue
  13. 7 7
      src/views/product-material/material-classification/add.vue
  14. 7 7
      src/views/product-material/material-classification/edit.vue
  15. 5 5
      src/views/product-material/material-classification/index.vue
  16. 22 25
      src/views/product-material/material-library/add.vue
  17. 5 5
      src/views/product-material/material-library/index.vue
  18. 7 7
      src/views/product-material/product-classification/add.vue
  19. 7 7
      src/views/product-material/product-classification/edit.vue
  20. 5 5
      src/views/product-material/product-classification/index.vue
  21. 19 22
      src/views/product-material/product-library/add.vue
  22. 5 5
      src/views/product-material/product-library/index.vue
  23. 6 6
      src/views/production/technology/add.vue
  24. 8 8
      src/views/production/workingProcedure/add.vue
  25. 6 20
      src/views/production/workingProcedure/index.vue
  26. 12 15
      src/views/production/workshop/add.vue
  27. 8 8
      src/views/production/workshop/index.vue

+ 10 - 2
src/components/equipment-top.vue

@@ -1,4 +1,12 @@
 <template>
-  <van-image width="100%" height="15rem" fit="cover" src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg" />
+  <van-image width="100%" height="15rem" fit="cover" :src="zuzhuangjiImg" />
 </template>
-<script setup name="equipment-top"></script>
+<script setup name="equipment-top">
+import zuzhuangjiImg from '@/assets/images/img_jq@2x.png'
+
+</script>
+<style lang="scss">
+  .van-image{
+    background: #fff;
+  }
+</style>

+ 164 - 3
src/lang/cn.js

@@ -1,7 +1,7 @@
 
 export const lang = {
 	common:{
-		//消息,工作台,物联网,我的,请输入关键词,添加没有更多了,释放即可刷新,下拉即可刷新,加载中,加载失败,加载完成,没有更多了,返回,提交,修改成功,新增成功,删除成功,确定,取消,提示,自动,正常,运行,离线,明细,请选择
+		//消息,工作台,物联网,我的,请输入关键词,添加没有更多了,释放即可刷新,下拉即可刷新,加载中,加载失败,加载完成,没有更多了,返回,提交,修改成功,新增成功,删除成功,确定,取消,提示,自动,手动,正常,运行,离线,明细,请选择,删除,添加明细,标题
 		message:'消息',
 		workbench:'工作台',
 		things:'物联网',
@@ -24,6 +24,7 @@ export const lang = {
 		cancel:'取消',
 		prompt:'提示',
 		auto:'自动',
+		manual:'手动',
 		normal:'正常',
 		equipmentStatus:"设备状态",
 		operatingMode:"工作模式",
@@ -31,14 +32,174 @@ export const lang = {
 		offline:"离线",
 		details:"明细",
 		pleaseSelect:"请选择",
+		delete:"删除",
+		addDetails:"添加明细",
+		title:"标题",
+	},
+	procureList:{
+		//待采购,采购,申购单号,物品名称,申购数量,已采购,申购部门,选择申购部门,申购部门不能为空,申购人名称,请填写申购人名称,申购人名称不能为空,申购时间,点击选择时间,申购时间不能为空,供应商,选择供应商,供应商不能为空,申购说明,请填写申购说明,申购说明不能为空,申购产品,选择申购产品,申购产品不能为空,数量,请输入数量,数量不能为空,本次采购,请输入本次采购,本次采购不能为空
+		//单价,请输入单价,单价不能为空,总价,根据本次采购和单价自动计算,所有明细的金额合计,采购申请成功
+		name:'待采购',
+		purchase:'采购',
+		procurementNumber:'申购单号',
+		itemName:'物品名称',
+		procurementQuantity:'申购数量',
+		purchased:'已采购',
+		procurementDepartment:'申购部门',
+		selectProcurementDepartment:'选择申购部门',
+		procurementDepartmentCanNotBeEmpty:'申购部门不能为空',
+		procurementPersonName:'申购人名称',
+		pleaseFillInTheProcurementPersonName:'请填写申购人名称',
+		procurementPersonNameCanNotBeEmpty:'申购人名称不能为空',
+		procurementTime:'申购时间',
+		clickToSelectTime:'点击选择时间',
+		procurementTimeCanNotBeEmpty:'申购时间不能为空',
+		supplier:'供应商',
+		selectSupplier:'选择供应商',
+		supplierCanNotBeEmpty:'供应商不能为空',
+		procurementDescription:'申购说明',
+		pleaseFillInTheProcurementDescription:'请填写申购说明',
+		procurementDescriptionCanNotBeEmpty:'申购说明不能为空',
+		procurementProduct:'申购产品',
+		selectProcurementProduct:'选择申购产品',
+		procurementProductCanNotBeEmpty:'申购产品不能为空',
+		quantity:'数量',
+		pleaseEnterTheQuantity:'请输入数量',
+		quantityCanNotBeEmpty:'数量不能为空',
+		thisPurchase:'本次采购',
+		pleaseEnterThisPurchase:'请输入本次采购',
+		thisPurchaseCanNotBeEmpty:'本次采购不能为空',
+		unitPrice:'单价',
+		pleaseEnterTheUnitPrice:'请输入单价',
+		unitPriceCanNotBeEmpty:'单价不能为空',
+		totalPrice:'总价',
+		accordingToThisPurchaseAndUnitPrice:'根据本次采购和单价自动计算',
+		theTotalAmountOfAllDetails:'所有明细的金额合计',
+		purchaseApplicationSuccessful:'采购申请成功',
+	},
+	priceConfig:{
+		//供应价格,供应商,物品名称,供应单价,选择供应商,供应商不能为空,供应物品,选择物品名称,物品名称不能为空,请输入供应单价,供应单价不能为空
+		name:'供应价格',
+		supplyPrice:'供应价格',
+		supplier:'供应商',
+		itemName:'物品名称',
+		supplyUnitPrice:'供应单价',
+		selectSupplier:'选择供应商',
+		supplierCanNotBeEmpty:'供应商不能为空',
+		supplyItems:'供应物品',
+		selectItemName:'选择物品名称',
+		itemNameCanNotBeEmpty:'物品名称不能为空',
+		pleaseEnterSupplyUnitPrice:'请输入供应单价',
+		supplyUnitPriceCanNotBeEmpty:'供应单价不能为空',
+
+	},
+	productLibrary:{
+		//产品库,产品分类,产品编码,产品名称,产品类型,成品,半成品,规格型号,单位,文件上传,备注,产品分类不能为空,产品类型不能为空,产品名称不能为空,规格型号不能为空,单位不能为空,请选择,请选择时间,请选择级联
+		name:'产品库',
+		productClassification:'产品分类',
+		productCode:'产品编码',
+		productName:'产品名称',
+		productType:'产品类型',
+		finishedProduct:'成品',
+		semifinishedProduct:'半成品',
+		specificationModel:'规格型号',
+		unit:'单位',
+		fileUpload:'文件上传',
+		remarks:'备注',
+		productClassificationCanNotBeEmpty:'产品分类不能为空',
+		productTypeCanNotBeEmpty:'产品类型不能为空',
+		productNameCanNotBeEmpty:'产品名称不能为空',
+		specificationModelCanNotBeEmpty:'规格型号不能为空',
+		unitCanNotBeEmpty:'单位不能为空',
+		pleaseSelect:'请选择',
+		pleaseSelectTime:'请选择时间',
+		pleaseSelectCascader:'请选择级联',
+
+	},
+	productClassification:{
+		//产品分类,添加一级节点,是否确认删除该分类,产品分类添加,节点名称,请填写节点名称,节点名称不能为空,产品分类编辑
+		name:'产品分类',
+		addFirstLevelNode:'添加一级节点',
+		confirmDeleteTheClassification:'是否确认删除该分类',
+		productClassificationAdd:'产品分类添加',
+		nodeName:'节点名称',
+		pleaseFillInTheNodeName:'请填写节点名称',
+		nodeNameCanNotBeEmpty:'节点名称不能为空',
+		productClassificationEdit:'产品分类编辑',
+	},
+	library:{
+		//物料库,物料分类,物料编码,物料名称,物料类型,原料,辅料,配件,包材,其他,规格型号,单位,文件上传,备注,产品分类不能为空,产品类型不能为空,产品名称不能为空,规格型号不能为空,单位不能为空,请选择,请选择时间,请选择级联
+		name:'物料库',
+		materialClassification:'物料分类',
+		materialCode:'物料编码',
+		materialName:'物料名称',
+		materialType:'物料类型',
+		rawMaterial:'原料',
+		accessory:'辅料',
+		fittings:'配件',
+		packaging:'包材',
+		other:'其他',
+		specificationModel:'规格型号',
+		unit:'单位',
+		fileUpload:'文件上传',
+		remark:'备注',
+		productClassificationCanNotBeEmpty:'产品分类不能为空',
+		productTypeCanNotBeEmpty:'产品类型不能为空',
+		productNameCanNotBeEmpty:'产品名称不能为空',
+		specificationModelCanNotBeEmpty:'规格型号不能为空',
+		unitCanNotBeEmpty:'单位不能为空',
+		pleaseSelect:'请选择',
+		pleaseSelectTime:'请选择时间',
+		pleaseSelectCascader:'请选择级联',
+		
+	},
+	classification:{
+		//物料分类,物料分类添加,节点名称,请填写节点名称,节点名称不能为空,添加一级节点,是否确认删除该分类,物料分类编辑
+		name:'物料分类',
+		materialClassificationAdd:'物料分类添加',
+		nodeName:'节点名称',
+		pleaseFillInNodeName:'请填写节点名称',
+		nodeNameCanNotBeEmpty:'节点名称不能为空',
+		addFirstLevelNode:'添加一级节点',
+		confirmToDeleteTheClassification:'是否确认删除该分类',
+		materialClassificationEdit:'物料分类编辑',
+	},
+	workshop:{
+		//车间配置,车间名称,负责人名称,车间类型,普通车间,半自动化车间,自动化车间,负责人,备注,车间类型不能为空,车间名称不能为空,负责人不能为空
+		name:'车间配置',
+		workshopName:'车间名称',
+		principalName:'负责人名称',
+		workshopType:'车间类型',
+		ordinaryWorkshop:'普通车间',
+		semiAutomaticWorkshop:'半自动化车间',
+		automaticWorkshop:'自动化车间',
+		principal:'负责人',
+		remarks:'备注',
+		workshopTypeCanNotBeEmpty:'车间类型不能为空',
+		workshopNameCanNotBeEmpty:'车间名称不能为空',
+		principalCanNotBeEmpty:'负责人不能为空',
+	},
+	workingProcedure:{
+		//工序管理,工序名称,工序说明,工序文件,车间类型不能为空,请上传工序文件
+		name:'工序管理',
+		processName:'工序名称',
+		processDescription:'工序说明',
+		processFile:'工序文件',
+		workshopTypeCanNotBeEmpty:'车间类型不能为空',
+		pleaseUploadProcessFile:'请上传工序文件',
+
 	},
 	technology:{
-		//工艺管理,工序名称,工艺路线,适用产品
+		//工艺管理,工序名称,工艺路线,适用产品,车间名称,工艺线路,适用产品,车间类型不能为空,请上传工序文件
 		name:'工艺管理',
 		processName:'工序名称',
 		processRoute:'工艺路线',
 		applicableProducts:'适用产品',
-
+		workshopName:'车间名称',
+		processRoute:'工艺线路',
+		applicableProducts:'适用产品',
+		workshopTypeCanNotBeEmpty:'车间类型不能为空',
+		pleaseUploadProcessFile:'请上传工序文件',
 	},
 	factory:{
 		//产线配置,产线名称,负责人名称,产线类型,普通产线,半自动化产线,自动化产线,车间名称,产线类型,产线名称,负责人,产线说明,产线类型不能为空,产线名称不能为空,车间名称不能为空

+ 1 - 1
src/lang/index.js

@@ -18,7 +18,7 @@ const i18n = createI18n({
 console.log(require('./cn.js').lang)
 get('/open/multilingual/getJson',{}).then(res=>{
   console.log(JSON.parse(res.data),'下载')
-  // window.localStorage.setItem('lang',res.data)
+  window.localStorage.setItem('lang',res.data)
   // i18n.global.setLocaleMessage('zh-cn', require('./cn.js').lang)
 })
 

+ 30 - 16
src/views/equipment/assemble.vue

@@ -16,7 +16,7 @@
                 </div>
                 <div class="text">
                     <div class="label">{{$t('common.equipmentStatus')}}</div>
-                    <div class="value" style="color: #3fbf31">{{$t('common.normal')}}</div>
+                    <div class="value" style="color: #3fbf31">{{showData.switchType ? $t('common.normal') : $t('common.offline')}}</div>
                 </div>
             </div>
             <div class="mode">
@@ -25,32 +25,32 @@
                 </div>
                 <div class="text">
                     <div class="label">{{$t('common.operatingMode')}}</div>
-                    <div class="value">{{$t('common.auto')}}</div>
+                    <div class="value">{{showData.discreteInputs[2] ? $t('common.auto') : $t('common.manual')}}</div>
                 </div>
             </div>
         </div>
-        <commonCharts></commonCharts>
+        <!-- <commonCharts></commonCharts> -->
 		<ul>
 			<li>
 				<div class="li-icon">
 					<img src="@/assets/images/icon_zdj@2x.png" alt="" />
 				</div>
 				<div class="li-text">{{$t('assemblingMachine.mainMotor')}}</div>
-				<div class="li-stat li-stat-bg"></div>
+				<div class="li-stat li-stat-bg" :class="!showData.coils[7] ? 'li-stat-bg-close' : ''"></div>
 			</li>
 			<li>
 				<div class="li-icon">
 					<img src="@/assets/images/icon_qf@2x.png" alt="" />
 				</div>
 				<div class="li-text">{{$t('assemblingMachine.valve')}}</div>
-				<div class="li-stat li-stat-bg"></div>
+				<!-- <div class="li-stat li-stat-bg"></div> -->
 			</li>
 			<li>
 				<div class="li-icon">
 					<img src="@/assets/images/icon_lxj@2x.png" alt="" />
 				</div>
 				<div class="li-text">{{$t('assemblingMachine.centrifuge')}}</div>
-				<div class="li-stat li-stat-bg"></div>
+				<div class="li-stat li-stat-bg" :class="!showData.coils[20] ? 'li-stat-bg-close' : ''"></div>
 			</li>
 		</ul>
         <div class="speed-warp">
@@ -58,11 +58,11 @@
                 <div class="icon"></div>
                 <div class="text">{{$t('assemblingMachine.frequencyOfMainMotor')}}</div>
                 <div class="line">
-                    <div></div>
+                    <div :style="`width:${showData.holdingRegisters[0] / 100}%`"></div>
                 </div>
-                <div class="num">99%</div>
+                <div class="num">{{showData.holdingRegisters[0] / 100 }}%</div>
             </div>
-            <div style="margin:0 12px">
+            <!-- <div style="margin:0 12px">
                 <div class="sm-box">
                     <div class="icon"></div>
                     <div class="text">{{$t('assemblingMachine.stopperRate')}}</div>
@@ -103,7 +103,7 @@
                         </div>
                     </div>
                 </div>
-            </div>
+            </div> -->
         </div>
 	</div>
 </template>
@@ -112,18 +112,28 @@ import equipmentTop from '@/components/equipment-top.vue'
 import commonCharts from './components/commonCharts.vue'
 import * as echarts from 'echarts'
 import { ref, reactive, onMounted,getCurrentInstance } from 'vue'
+import { useRoute } from "vue-router";
+const route = useRoute();
 const proxy = getCurrentInstance().proxy
 const onClickLeft = () => history.back();
 const getDtl = () => {
-	axisData.value = []
-	proxy.post('/tdaDevice/data', { deviceId: router.currentRoute.value.params.id }).then(
-		(res) => {
-			
-		}
-	)
 	
 }
+const showData = ref({
+    coils:[],
+    discreteInputs:[],
+    holdingRegisters:[],
+    inputRegisters:[],
+    switchType:[],
+})
 getDtl()
+onMounted(() => {
+    showData.value = JSON.parse(route.query.data)
+    if(showData.value.coils.length > 0) {
+        showData.value.switchType = true
+    }
+    console.log(showData.value)
+})
 </script>
 <style lang="scss" scoped>
 .fermentator-header {
@@ -304,6 +314,10 @@ getDtl()
 				border: 3px solid #d8f2d5;
 				box-sizing: border-box;
 			}
+            .li-stat-bg-close {
+                background: #BBBBBB;
+                border: 3px solid #f1f1f1;
+            }
 			.li-stat-img {
 				img {
 					width: 100%;

+ 17 - 4
src/views/equipment/index.vue

@@ -49,11 +49,15 @@
 </template>
 <script setup>
 import { ref, getCurrentInstance, onMounted } from 'vue'
+import {getUserInfo} from '@/utils/auth'
 const loading = ref(false)
 const finished = ref(false);
 const proxy = getCurrentInstance().proxy
 const listData = ref([])
 const onRefresh = () => {
+	listData.value = []
+	loading.value = true
+	getList()
 	setTimeout(() => {
 		loading.value = false
 	}, 500)
@@ -69,10 +73,19 @@ const toDtl = (row) => {
 	proxy.$router.push('/main/warpKnitting/' + row.deviceId)
 }
 const getList = () => {
-	proxy.post('/tdaDevice/page').then(res => {
-		listData.value = res.data.rows
-		console.log(res)
-	})
+	if(getUserInfo().tenantId != 'smt') {
+		proxy.post('/tdaDevice/computerList').then(res => {
+			listData.value = res.data.rows
+			console.log(res)
+		})
+	}else{
+		proxy.post('/tdaDevice/page').then(res => {
+			listData.value = res.data.rows
+			console.log(res)
+		})
+	}
+	
+	
 }
 getList()
 </script>

+ 37 - 10
src/views/equipment/xiamenList.vue

@@ -8,7 +8,19 @@
 				@load="onLoad"
 			>
 				<ul>
-					<li @click="toDtl(1)">
+					<li @click="toDtl(i)" v-for="i in listData" :key='i.equipmentNo'>
+						<div class="title">{{equipmentTypeList[i.type]}}</div>
+						<div class="content">
+							<div class="item">
+								<div class="label">型号:</div>
+								<div class="value">{{i.equipmentNo}}</div>
+							</div>
+							
+						</div>
+						
+						<div class="type success">运行</div>
+					</li>
+					<!-- <li @click="toDtl(1)">
 						<div class="title">发酵机1</div>
 						<div class="content">
 							<div class="item">
@@ -31,7 +43,7 @@
 						</div>
 						
 						<div class="type success">运行</div>
-					</li>
+					</li> -->
 				</ul>
 			</van-list>
 		</div>
@@ -55,17 +67,32 @@ const onLoad = () => {
     }, 500)
 }
 
-const toDtl = (id) => {
-	if(id === 1) {
-		proxy.$router.push('/main/fermentator/' + id)
-	}else{
-		proxy.$router.push('/main/dryer/' + id)
-	}
+const toDtl = (i) => {
+	console.log(i)
+	proxy.$router.push({
+		path: equipmentUrlList.value[i.type] + i.iot_deviceId,
+		query: {
+			data: i.data
+		}
+	})
 	
 }
+//1 注塑机 2 滚印机 3 注射器组装机 4 螺纹头组装机
+const equipmentTypeList = ref({
+	1: '注塑机',
+	2: '滚印机',
+	3: '注射器组装机',
+	4: '螺纹头组装机'
+})
+const equipmentUrlList = ref({
+	1: '/main/injectionMoldingMachine',
+	2: '/main/rollerPrinter',
+	3: '/main/assemble/',
+	4: '/main/threadedHeadAssemblyMachine'
+})
 const getList = () => {
-	proxy.post('/tdaDevice/page').then(res => {
-		listData.value = res.data.rows
+	proxy.post('/tdaDevice/computerList').then(res => {
+		listData.value = res.data
 		console.log(res)
 	})
 }

+ 1 - 1
src/views/main.vue

@@ -10,7 +10,7 @@
 		>
 		<van-tabbar-item
 			icon="friends-o"
-			:to="tenantId == 'xmhjc' ? '/main/xiamenList' : '/main/equipment'"
+			:to="tenantId != 'smt' ? '/main/xiamenList' : '/main/equipment'"
 			>{{$t('common.things')}}</van-tabbar-item
 		>
 		<van-tabbar-item icon="setting-o" to="/main/home">{{$t('common.mine')}}</van-tabbar-item>

+ 15 - 15
src/views/procurementManagement/priceConfig/add.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="form">
       <van-nav-bar
-        title="供应价格"
+        :title="$t('priceConfig.name')"
         :left-text="$t('common.back')"
         left-arrow
         @click-left="onClickLeft"
@@ -13,10 +13,10 @@
             v-model="formData.supplierInfoName"
             is-link
             readonly
-            label="供应商"
-            placeholder="选择供应商"
+            :label="$t('priceConfig.supplier')"
+            :placeholder="$t('priceConfig.selectSupplier')"
             @click="typeModal = true"
-            :rules="[{ required: true, message: '供应商不能为空' }]"
+            :rules="[{ required: true, message: $t('priceConfig.supplierCanNotBeEmpty') }]"
             required
           />
           <van-popup v-model:show="typeModal" round position="bottom">
@@ -29,31 +29,31 @@
           <!-- 明细列表 -->
           <div v-for="(item, index) in list" :key="index">
             <div class="row commons-item-title-delete">
-              <div class="title">供应物品 {{ index + 1 }}</div>
+              <div class="title">{{$t('priceConfig.supplyItems')}} {{ index + 1 }}</div>
               <div
                 class="delete"
                 @click.native="handleDel(index)"
                 v-if="!route.query.id"
               >
-                删除
+                {{$t('common.delete')}}
               </div>
             </div>
             <van-field
               v-model="list[index].productInfoName"
               is-link
               readonly
-              label="物品名称"
-              placeholder="选择物品名称"
+              :label="$t('priceConfig.itemName')"
+              :placeholder="$t('priceConfig.selectItemName')"
               @click="handleSelect(index)"
-              :rules="[{ required: true, message: '物品名称不能为空' }]"
+              :rules="[{ required: true, message: $t('priceConfig.itemNameCanNotBeEmpty') }]"
               required
             />
   
             <van-field
               v-model="list[index].price"
-              label="供应单价"
-              placeholder="请输入"
-              :rules="[{ required: true, message: '供应单价不能为空' }]"
+              :label="$t('priceConfig.supplyUnitPrice')"
+              :placeholder="$t('priceConfig.pleaseEnterSupplyUnitPrice')"
+              :rules="[{ required: true, message: $t('priceConfig.supplyUnitPriceCanNotBeEmpty')}]"
               required
             />
           </div>
@@ -75,13 +75,13 @@
             style="margin-top: 10px"
             block
             @click="handleAddRow"
-            >添加明细</van-button
+            >{{$t('common.addDetails')}}</van-button
           >
         </div>
   
         <div style="margin: 16px" v-if="!route.query.id">
           <van-button round block type="primary" native-type="submit">
-            提交
+            {{$t('common.submit')}}
           </van-button>
         </div>
       </van-form>
@@ -187,7 +187,7 @@
     proxy.post("/supplierPrice/" + route.query.type, formData.value).then(
       (res) => {
         setTimeout(() => {
-          showSuccessToast(route.query.type == "add" ? "添加成功" : "修改成功");
+          showSuccessToast(route.query.type == "add" ? proxy.t('common.addSuccess') : proxy.t('common.modifySuccess'));
           proxy.$router.push("/main/priceConfig");
         }, 500);
       },

+ 10 - 8
src/views/procurementManagement/priceConfig/edit.vue

@@ -1,20 +1,22 @@
 <template>
     <div class="form">
-        <van-nav-bar title="供应价格" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft">
+        <van-nav-bar :title="$t('priceConfig.name')" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft">
         </van-nav-bar>
         <van-form @submit="editSubmit" label-align="top" style="margin-top: 20px">
             <van-cell-group inset>
-                <van-field v-model="formData.supplierInfoName" is-link readonly label="供应商" placeholder="选择供应商"
+                <van-field v-model="formData.supplierInfoName" is-link readonly :label="$t('priceConfig.supplier')"
+                    :placeholder="$t('priceConfig.selectSupplier')"
                     />
                 <van-popup v-model:show="typeModal" round position="bottom">
                     <van-picker :columns="columns" @cancel="typeModal = false" @confirm="onConfirm" />
                 </van-popup>
-                <van-field v-model="formData.productInfoName" is-link readonly label="物品名称" placeholder="选择物品名称"
-                   
+                <van-field v-model="formData.productInfoName" is-link readonly :label="$t('priceConfig.itemName')"
+                    :placeholder="$t('priceConfig.selectItemName')"
                     v-if="route.query.id" />
 
-                <van-field v-model="formData.price" label="供应单价" placeholder="请输入供应单价"
-                    :rules="[{ required: true, message: '供应单价不能为空' }]" required v-if="route.query.id" />
+                <van-field v-model="formData.price" :label="$t('priceConfig.supplyUnitPrice')"
+                    :placeholder="$t('priceConfig.pleaseEnterSupplyUnitPrice')"
+                    :rules="[{ required: true, message: $t('priceConfig.supplyUnitPriceCanNotBeEmpty')}]" required v-if="route.query.id" />
                 <!-- 明细列表 -->
                 <van-popup v-model:show="typeModalOne" round position="bottom">
                     <van-picker :columns="columnsOne" @cancel="typeModalOne = false"
@@ -26,7 +28,7 @@
 
             <div style="margin: 16px">
                 <van-button round block type="primary" native-type="submit">
-                    提交
+                   {{$t('common.submit')}}
                 </van-button>
             </div>
             
@@ -113,7 +115,7 @@ const editSubmit = () => {
     proxy.post("/supplierPrice/edit", formData.value).then(
         (res) => {
             setTimeout(() => {
-                showSuccessToast("修改成功");
+                showSuccessToast(proxy.$t("common.modifySuccess"));
                 proxy.$router.push("/main/priceConfig");
             }, 500);
         },

+ 5 - 5
src/views/procurementManagement/priceConfig/index.vue

@@ -1,12 +1,12 @@
 <template>
     <van-nav-bar
-      title="供应价格"
+      :title="$t('priceConfig.name')"
       left-text=""
       left-arrow
       @click-left="onClickLeft"
       @click-right="onClickRight"
     >
-      <template #right> 添加 </template>
+      <template #right> {{$t('common.add')}} </template>
     </van-nav-bar>
     <van-search
       v-model="req.keyword"
@@ -48,15 +48,15 @@
   
   const listConfig = ref([
     {
-      label: "供应商",
+      label: proxy.t('priceConfig.supplier'),
       prop: "supplierName",
     },
     {
-      label: "物品名称",
+      label: proxy.t('priceConfig.itemName'),
       prop: "productName",
     },
     {
-      label: "供应单价",
+      label: proxy.t('priceConfig.supplyUnitPrice'),
       prop: "price",
     },
   ]);

+ 43 - 45
src/views/procurementManagement/procureList/add.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="form" style="padding-bottom: 60px">
 		<van-nav-bar
-			title="待采购"
+			:title="$t('procureList.name')"
 			:left-text="$t('common.back')"
 			left-arrow
 			@click-left="onClickLeft"
@@ -13,19 +13,19 @@
 					v-model="formData.deptName"
 					is-link
 					readonly
-					label="申购部门"
-					placeholder="选择申购部门"
-					:rules="[{ required: true, message: '申购部门不能为空' }]"
+					:label="$t('procureList.procurementDepartment')"
+					placeholder="$t('procureList.selectProcurementDepartment')"
+					:rules="[{ required: true, message: $t('procureList.procurementDepartmentCanNotBeEmpty')}]"
 					:readonly="true"
 					required
 				/>
 				<van-field
 					v-model="formData.purchaseName"
 					type="text"
-					name="申购人名称"
-					label="申购人名称"
-					placeholder="请填写申购人名称"
-					:rules="[{ required: true, message: '申购人名称不能为空' }]"
+					:name="$t('procureList.procurementPersonName')"
+					:label="$t('procureList.procurementPersonName')"
+					placeholder="$t('procureList.pleaseFillInTheProcurementPersonName')"
+					:rules="[{ required: true, message: $t('procureList.procurementPersonNameCanNotBeEmpty') }]"
                     required
 					:readonly="true"
 				/>
@@ -34,11 +34,11 @@
 					is-link
 					readonly
 					name="datePicker"
-					label="申购时间"
-					placeholder="点击选择时间"
+					:label="$t('procureList.procurementTime')"
+					:placeholder="$t('procureList.clickToSelectTime')"
 					
 					
-					:rules="[{ required: true, message: '申购时间不能为空' }]"
+					:rules="[{ required: true, message: $t('procureList.procurementTimeCanNotBeEmpty') }]"
                     required
 					:readonly="true"
 				/>
@@ -52,15 +52,15 @@
 					v-model="formData.supplyName"
 					is-link
 					readonly
-					label="供应商"
-					placeholder="选择供应商"
+					label="$t('procureList.supplier')"
+					placeholder="$t('procureList.selectSupplier')"
 					@click=" typeModal = true"
-					:rules="[{ required: true, message: '供应商不能为空' }]"
+					:rules="[{ required: true, message: $t('procureList.supplierCanNotBeEmpty') }]"
 					required
 				/>
 				<van-popup v-model:show="typeModal" position="bottom">
 					<van-picker
-						title="标题"
+						title="$t('common.title')"
 						:columns="supplyList"
 						@confirm="onConfirm"
 						@cancel="typeModal = false"
@@ -69,10 +69,10 @@
 				<van-field
 					v-model="formData.purchaseContent"
 					type="textarea"
-					name="申购说明"
-					label="申购说明"
-					placeholder="请填写申购说明"
-					:rules="[{ required: true, message: '申购说明不能为空' }]"
+					:name="$t('procureList.procurementDescription')"
+					:label="$t('procureList.procurementDescription')"
+					:placeholder="$t('procureList.pleaseFillInTheProcurementDescription')"
+					:rules="[{ required: true, message: $t('procureList.procurementDescriptionCanNotBeEmpty') }]"
                     required
 					rows="3"
 				/>
@@ -84,7 +84,7 @@
 				:key="index"
 			>
 				<div class="commons-delete">
-					<div class="title">明细{{ index + 1 }}</div>
+					<div class="title">{{$t('common.details')}}{{ index + 1 }}</div>
 					<!-- <div
 						class="delete"
 						@click.native="handleDel(index)"
@@ -95,25 +95,23 @@
 				</div>
 				<van-cell-group inset>
 					<van-field
-						v-model="
-							formData.purchaseDetailList[index].productName
-						"
+						v-model="formData.purchaseDetailList[index].productName"
 						is-link
 						readonly
-						label="申购产品"
-						placeholder="选择申购产品"
+						:label="$t('procureList.procurementProduct')"
+						:placeholder="$t('procureList.selectProcurementProduct')"
 						:readonly="true"
 						
 						:rules="[
-							{ required: true, message: '申购产品不能为空' },
+							{ required: true, message: $t('procureList.procurementProductCanNotBeEmpty') },
 						]"
 						required
 					/>
 					<van-field
 						v-model="formData.purchaseDetailList[index].count2"
-						label="数量"
-						placeholder="请输入数量"
-						:rules="[{ required: true, message: '数量不能为空' }]"
+						:label="$t('procureList.quantity')"
+						:placeholder="$t('procureList.pleaseEnterTheQuantity')"
+						:rules="[{ required: true, message: $t('procureList.quantityCanNotBeEmpty') }]"
 						required
                         type="number"
 						:readonly="true"
@@ -121,29 +119,29 @@
 
 					<van-field
 						v-model="formData.purchaseDetailList[index].count"
-						name="本次采购"
-						label="本次采购"
-						placeholder="请输入"
+						:name="$t('procureList.thisPurchase')"
+						:label="$t('procureList.thisPurchase')"
+						:placeholder="$t('procureList.pleaseEnterThisPurchase')"
 						@change='changePrice(index)'
-						:rules="[{ required: true, message: '本次采购不能为空' }]"
+						:rules="[{ required: true, message: $t('procureList.thisPurchaseCanNotBeEmpty') }]"
 						required
 						type="number"
 					/>
 					<van-field
 						v-model="formData.purchaseDetailList[index].price"
-						name="单价"
-						label="单价"
+						:name="$t('procureList.unitPrice')"
+						:label="$t('procureList.unitPrice')"
 						@change='changePrice(index)'
-						placeholder="请输入"
-						:rules="[{ required: true, message: '单价不能为空' }]"
+						:placeholder="$t('procureList.pleaseEnterTheUnitPrice')"
+						:rules="[{ required: true, message: $t('procureList.unitPriceCanNotBeEmpty') }]"
 						required
 						type="number"
 					/>
 					<van-field
 						v-model="formData.purchaseDetailList[index].amount"
-						name="总价"
-						label="总价"
-						placeholder="根据本次采购和单价自动计算"
+						:name="$t('procureList.totalPrice')"
+						:label="$t('procureList.totalPrice')"
+						:placeholder="$t('procureList.accordingToThisPurchaseAndUnitPrice')"
 						:readonly="true"
 						type="number"
 					/>
@@ -153,9 +151,9 @@
 			<van-field
 				style="margin-top:16px"
 				v-model="formData.amount"
-				name="总价"
-				label="总价"
-				placeholder="所有明细的金额合计"
+				:name="$t('procureList.totalPrice')"
+				:label="$t('procureList.totalPrice')"
+				placeholder="$t('procureList.theTotalAmountOfAllDetails')"
 				:readonly="true"
 				type="number"
 			/>
@@ -168,7 +166,7 @@
 			</van-popup>
 			<div style="margin: 16px" v-if="!route.query.id">
 				<van-button round block type="primary" native-type="submit">
-					提交
+					{{$t('common.submit')}}
 				</van-button>
 			</div>
 		</van-form>
@@ -311,7 +309,7 @@ const onSubmit = () => {
 	}).then(
 		(res) => {
 			setTimeout(() => {
-				showSuccessToast('采购申请成功')
+				showSuccessToast(proxy.t('purchaseApplicationSuccessful.purchaseApplicationSuccessful'))
 				proxy.$router.push('/main/procureList')
 			}, 100)
 		},

+ 6 - 6
src/views/procurementManagement/procureList/index.vue

@@ -1,12 +1,12 @@
 <template>
 	<van-nav-bar
-		title="待采购"
+		:title="$t('procureList.name')"
 		left-text=""
 		left-arrow
 		@click-left="onClickLeft"
 		@click-right="onClickRight"
 	>
-		<template #right> 采购 </template>
+		<template #right> {{$t('manualInbound.purchase')}} </template>
 	</van-nav-bar>
 	<van-search
 		v-model="req.keyword"
@@ -51,19 +51,19 @@ const listData = ref([])
 
 const listConfig = ref([
 	{
-		label: '申购单号',
+		label: proxy.t('procureList.procurementNumber'),
 		prop: 'subscribeCode',
 	},
 	{
-		label: '物品名称',
+		label: proxy.t('procureList.itemName'),
 		prop: 'productName',
 	},
 	{
-		label: '申购数量',
+		label: proxy.t('procureList.procurementQuantity'),
 		prop: 'count',
 	},
 	{
-		label: '已采购',
+		label: proxy.t('procureList.purchased'),
 		prop: 'purchaseCount',
 	},
 ])

+ 7 - 7
src/views/product-material/material-classification/add.vue

@@ -1,18 +1,18 @@
 <template>
   <div class="form">
-    <van-nav-bar title="物料分类添加" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+    <van-nav-bar :title="$t('classification.materialClassificationAdd')" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
     <van-form @submit="onSubmit" label-align="top" style="margin-top: 20px">
       <van-cell-group inset>
         <van-field
           v-model="formData.name"
-          name="节点名称"
-          label="节点名称"
-          placeholder="请填写节点名称"
-          :rules="[{ required: true, message: '节点名称不能为空' }]"
+          :name="$t('classification.nodeName')"
+          :label="$t('classification.nodeName')"
+          :placeholder="$t('classification.pleaseFillInNodeName')"
+          :rules="[{ required: true, message: $t('classification.nodeNameCanNotBeEmpty') }]"
           required />
       </van-cell-group>
       <div style="margin: 16px">
-        <van-button round block type="primary" native-type="submit"> 提交 </van-button>
+        <van-button round block type="primary" native-type="submit"> {{$t('common.submit')}} </van-button>
       </div>
     </van-form>
   </div>
@@ -34,7 +34,7 @@ const onSubmit = () => {
       definition: "2",
     })
     .then(() => {
-      showSuccessToast("添加成功");
+      showSuccessToast(proxy.t('common.addSuccess'));
       setTimeout(() => {
         history.back();
       }, 500);

+ 7 - 7
src/views/product-material/material-classification/edit.vue

@@ -1,18 +1,18 @@
 <template>
     <div class="form">
-      <van-nav-bar title="物料分类编辑" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+      <van-nav-bar :title="$t('classification.materialClassificationEdit')" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
       <van-form @submit="onSubmit" label-align="top" style="margin-top: 20px">
         <van-cell-group inset>
           <van-field
             v-model="formData.name"
-            name="节点名称"
-            label="节点名称"
-            placeholder="请填写节点名称"
-            :rules="[{ required: true, message: '节点名称不能为空' }]"
+            :name="$t('classification.nodeName')"
+            :label="$t('classification.nodeName')"
+            :placeholder="$t('classification.pleaseFillInNodeName')"
+            :rules="[{ required: true, message: $t('classification.nodeNameCanNotBeEmpty') }]"
             required />
         </van-cell-group>
         <div style="margin: 16px">
-          <van-button round block type="primary" native-type="submit"> 提交 </van-button>
+          <van-button round block type="primary" native-type="submit"> {{$t('common.submit')}} </van-button>
         </div>
       </van-form>
     </div>
@@ -34,7 +34,7 @@
         definition: "2",
       })
       .then(() => {
-        showSuccessToast("编辑成功");
+        showSuccessToast(proxy.t('common.modifySuccess'));
         setTimeout(() => {
           history.back();
         }, 500);

+ 5 - 5
src/views/product-material/material-classification/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="padding-bottom: 60px">
-    <van-nav-bar title="物料分类" left-text="" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+    <van-nav-bar :title="$t('classification.name')" left-text="" left-arrow @click-left="onClickLeft"> </van-nav-bar>
     <van-pull-refresh v-model="loading" @refresh="onRefresh">
       <div class="list">
         <van-list v-model:loading="loading" :finished="finished" finished-text="" @load="onLoad" style="margin-bottom: 60px">
@@ -12,7 +12,7 @@
             @clickDelete="(item) => clickDelete(item)">
           </treeNav>
           <div style="margin: 16px">
-            <van-button round block type="primary" @click="clickAdd({ id: '' })">添加一级节点</van-button>
+            <van-button round block type="primary" @click="clickAdd({ id: '' })">{{$t('classification.addFirstLevelNode')}}</van-button>
           </div>
         </van-list>
       </div>
@@ -83,8 +83,8 @@ const clickUpdate = (row) => {
 };
 const clickDelete = (row) => {
   showConfirmDialog({
-    title: "标题",
-    message: "是否确认删除该分类",
+    title: proxy.t('common.prompt'),
+    message: proxy.t('classification.confirmToDeleteTheClassification'),
   })
     .then(() => {
       proxy
@@ -92,7 +92,7 @@ const clickDelete = (row) => {
           id: row.id,
         })
         .then((res) => {
-          showSuccessToast("删除成功");
+          showSuccessToast(proxy.t('common.deleteSuccess'));
           getList();
         });
     })

+ 22 - 25
src/views/product-material/material-library/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="form">
-    <van-nav-bar title="物料库" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+    <van-nav-bar :title="$t('library.name')" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
     <testForm
       v-model="formData.data"
       :formOption="formOption"
@@ -53,7 +53,7 @@ const formOption = reactive({
 const formConfig = reactive([
   {
     type: "cascader",
-    label: "物料分类",
+    label: proxy.t('library.materialClassification'),
     prop: "productClassifyId",
     itemType: "common",
     showPicker: false,
@@ -73,7 +73,7 @@ const formConfig = reactive([
   },
   {
     type: "picker",
-    label: "物料类型",
+    label: proxy.t('library.materialType'),
     prop: "type",
     itemType: "onePicker",
     showPicker: false,
@@ -83,23 +83,23 @@ const formConfig = reactive([
     },
     data: [
       {
-        text: "原料",
+        text: proxy.t('library.rawMaterial'),
         value: "1",
       },
       {
-        text: "辅料",
+        text: proxy.t('library.accessory'),
         value: "2",
       },
       {
-        text: "配件",
+        text: proxy.t('library.fittings'),
         value: "3",
       },
       {
-        text: "包材",
+        text: proxy.t('library.packaging'),
         value: "4",
       },
       {
-        text: "其他",
+        text: proxy.t('library.other'),
         value: "5",
       },
     ],
@@ -107,20 +107,20 @@ const formConfig = reactive([
   {
     type: "input",
     itemType: "text",
-    label: "物料名称",
+    label: proxy.t('library.materialName'),
     prop: "name",
     clearable: true,
   },
   {
     type: "input",
     itemType: "text",
-    label: "规格型号",
+    label: proxy.t('library.specificationModel'),
     prop: "spec",
     clearable: true,
   },
   {
     type: "picker",
-    label: "单位",
+    label: proxy.t('library.unit'),
     prop: "unit",
     itemType: "onePicker",
     showPicker: false,
@@ -132,25 +132,25 @@ const formConfig = reactive([
   },
   {
     type: "upload",
-    label: "文件上传",
+    label: proxy.t('library.fileUpload'),
     prop: "fileList",
   },
   {
     type: "input",
     itemType: "textarea",
-    label: "备注",
+    label: proxy.t('library.remark'),
     prop: "remark",
   },
 ]);
 const rules = {
-  productClassifyId: [{ required: true, message: "产品分类不能为空" }],
-  type: [{ required: true, message: "产品类型不能为空" }],
-  name: [{ required: true, message: "产品名称不能为空" }],
-  spec: [{ required: true, message: "规格型号不能为空" }],
-  unit: [{ required: true, message: "单位不能为空" }],
-  select: [{ required: true, message: "请选择" }],
-  date: [{ required: true, message: "请选择时间" }],
-  common: [{ required: true, message: "请选择级联" }],
+  productClassifyId: [{ required: true, message: proxy.t('library.productClassificationCanNotBeEmpty') }],
+  type: [{ required: true, message: proxy.t('library.productTypeCanNotBeEmpty') }],
+  name: [{ required: true, message: proxy.t('library.productNameCanNotBeEmpty') }],
+  spec: [{ required: true, message: proxy.t('library.specificationModelCanNotBeEmpty')}],
+  unit: [{ required: true, message: proxy.t('library.unitCanNotBeEmpty') }],
+  select: [{ required: true, message: proxy.t('library.pleaseSelect') }],
+  date: [{ required: true, message: proxy.t('library.pleaseSelectTime') }],
+  common: [{ required: true, message: proxy.t('library.pleaseSelectCascader') }],
   // city: [{ required: true, message: "请选择城市" }],
 };
 const unitList = ref([]);
@@ -169,15 +169,12 @@ const getDict = () => {
 }
 getDict()
 const fileList = ref([]);
-const onOversize = () => {
-  showToast("文件大小不能超过 5MB");
-};
 const onClickLeft = () => history.back();
 const onSubmit = () => {
   console.log(formData)
   
   proxy.post("/productInfo/" + route.query.type, formData.data).then(() => {
-    showSuccessToast("添加成功");
+    showSuccessToast(proxy.t('common.addSuccess'))
     setTimeout(() => {
       history.back();
     }, 500);

+ 5 - 5
src/views/product-material/material-library/index.vue

@@ -1,6 +1,6 @@
 <template>
-  <van-nav-bar title="物料库" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
-    <template #right> 添加 </template>
+  <van-nav-bar :title="$t('library.name')" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
+    <template #right> {{$t('common.add')}} </template>
   </van-nav-bar>
   <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
@@ -29,15 +29,15 @@ const listData = ref([]);
 const classification = ref([]);
 const listConfig = ref([
   {
-    label: "物料分类",
+    label: proxy.t('library.materialClassification'),
     prop: "productClassifyName",
   },
   {
-    label: "物料编码",
+    label: proxy.t('library.materialCode'),
     prop: "code",
   },
   {
-    label: "物料名称",
+    label: proxy.t('library.materialName'),
     prop: "name",
   },
 ]);

+ 7 - 7
src/views/product-material/product-classification/add.vue

@@ -1,18 +1,18 @@
 <template>
   <div class="form">
-    <van-nav-bar title="产品分类添加" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+    <van-nav-bar :title="$t('productClassification.productClassificationAdd')" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
     <van-form @submit="onSubmit" label-align="top" style="margin-top: 20px">
       <van-cell-group inset>
         <van-field
           v-model="formData.name"
-          name="节点名称"
-          label="节点名称"
-          placeholder="请填写节点名称"
-          :rules="[{ required: true, message: '节点名称不能为空' }]"
+          :name="$t('productClassification.nodeName')"
+          :label="$t('productClassification.nodeName')"
+          :placeholder="$t('productClassification.pleaseFillInTheNodeName')"
+          :rules="[{ required: true, message: $t('productClassification.nodeNameCanNotBeEmpty') }]"
           required />
       </van-cell-group>
       <div style="margin: 16px">
-        <van-button round block type="primary" native-type="submit"> 提交 </van-button>
+        <van-button round block type="primary" native-type="submit"> {{$t('common.submit')}} </van-button>
       </div>
     </van-form>
   </div>
@@ -34,7 +34,7 @@ const onSubmit = () => {
       definition: "1",
     })
     .then(() => {
-      showSuccessToast("添加成功");
+      showSuccessToast(proxy.t('common.addSuccess'));
       setTimeout(() => {
         history.back();
       }, 500);

+ 7 - 7
src/views/product-material/product-classification/edit.vue

@@ -1,18 +1,18 @@
 <template>
     <div class="form">
-      <van-nav-bar title="产品分类编辑" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+      <van-nav-bar :title="$t('productClassification.productClassificationEdit')" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
       <van-form @submit="onSubmit" label-align="top" style="margin-top: 20px">
         <van-cell-group inset>
           <van-field
             v-model="formData.name"
-            name="节点名称"
-            label="节点名称"
-            placeholder="请填写节点名称"
-            :rules="[{ required: true, message: '节点名称不能为空' }]"
+           :name="$t('productClassification.nodeName')"
+          :label="$t('productClassification.nodeName')"
+          :placeholder="$t('productClassification.pleaseFillInTheNodeName')"
+            :rules="[{ required: true, message: $t('productClassification.nodeNameCanNotBeEmpty') }]"
             required />
         </van-cell-group>
         <div style="margin: 16px">
-          <van-button round block type="primary" native-type="submit"> 提交 </van-button>
+          <van-button round block type="primary" native-type="submit"> {{$t('common.submit')}} </van-button>
         </div>
       </van-form>
     </div>
@@ -34,7 +34,7 @@
         definition: "1",
       })
       .then(() => {
-        showSuccessToast("编辑成功");
+        showSuccessToast(proxy.t('common.modifySuccess'));
         setTimeout(() => {
           history.back();
         }, 500);

+ 5 - 5
src/views/product-material/product-classification/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="padding-bottom: 60px">
-    <van-nav-bar title="产品分类" left-text="" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+    <van-nav-bar :title="$t('productClassification.name')" left-text="" left-arrow @click-left="onClickLeft"> </van-nav-bar>
     <van-pull-refresh v-model="loading" @refresh="onRefresh">
       <div class="list">
         <van-list v-model:loading="loading" :finished="finished" finished-text="" @load="onLoad" style="margin-bottom: 60px">
@@ -12,7 +12,7 @@
             @clickDelete="(item) => clickDelete(item)">
           </treeNav>
           <div style="margin: 16px">
-            <van-button round block type="primary" @click="clickAdd({ id: '' })">添加一级节点</van-button>
+            <van-button round block type="primary" @click="clickAdd({ id: '' })">{{$t('productClassification.addFirstLevelNode')}}</van-button>
           </div>
         </van-list>
       </div>
@@ -83,8 +83,8 @@ const clickUpdate = (row) => {
 };
 const clickDelete = (row) => {
   showConfirmDialog({
-    title: "标题",
-    message: "是否确认删除该分类",
+    title: proxy.t('common.prompt'),
+    message: proxy.t('productClassification.confirmDeleteTheClassification'),
   })
     .then(() => {
       proxy
@@ -92,7 +92,7 @@ const clickDelete = (row) => {
           id: row.id,
         })
         .then((res) => {
-          showSuccessToast("删除成功");
+          showSuccessToast(proxy.t('common.deleteSuccess'),);
           getList();
         });
     })

+ 19 - 22
src/views/product-material/product-library/add.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="form">
 		<van-nav-bar
-			title="产品库"
+			:title="$t('productLibrary.name')"
 			:left-text="$t('common.back')"
 			left-arrow
 			@click-left="onClickLeft"
@@ -47,7 +47,7 @@ const formOption = reactive({
 const formConfig = reactive([
   {
     type: "cascader",
-    label: "产品分类",
+    label: proxy.t('productLibrary.productClassification'),
     prop: "productClassifyId",
     itemType: "common",
     showPicker: false,
@@ -67,7 +67,7 @@ const formConfig = reactive([
   },
   {
     type: "picker",
-    label: "产品类型",
+    label: proxy.t('productLibrary.productType'),
     prop: "type",
     itemType: "onePicker",
     showPicker: false,
@@ -77,11 +77,11 @@ const formConfig = reactive([
     },
     data: [
       {
-        label: "成品",
+        label: proxy.t('productLibrary.finishedProduct'),
         id: "10",
       },
       {
-        label: "半成品",
+        label: proxy.t('productLibrary.semifinishedProduct'),
         id: "2",
       },
     ],
@@ -89,20 +89,20 @@ const formConfig = reactive([
   {
     type: "input",
     itemType: "text",
-    label: "产品名称",
+    label: proxy.t('productLibrary.productName'),
     prop: "name",
     clearable: true,
   },
   {
     type: "input",
     itemType: "text",
-    label: "规格型号",
+    label: proxy.t('productLibrary.specificationModel'),
     prop: "spec",
     clearable: true,
   },
   {
     type: "picker",
-    label: "单位",
+    label: proxy.t('productLibrary.unit'),
     prop: "unit",
     itemType: "onePicker",
     showPicker: false,
@@ -114,25 +114,25 @@ const formConfig = reactive([
   },
   {
     type: "upload",
-    label: "文件上传",
+    label: proxy.t('productLibrary.fileUpload'),
     prop: "fileList",
   },
   {
     type: "input",
     itemType: "textarea",
-    label: "备注",
+    label: proxy.t('productLibrary.remarks'),
     prop: "remark",
   },
 ]);
 const rules = {
-  productClassifyId: [{ required: true, message: "产品分类不能为空" }],
-  type: [{ required: true, message: "产品类型不能为空" }],
-  name: [{ required: true, message: "产品名称不能为空" }],
-  spec: [{ required: true, message: "规格型号不能为空" }],
-  unit: [{ required: true, message: "单位不能为空" }],
-  select: [{ required: true, message: "请选择" }],
-  date: [{ required: true, message: "请选择时间" }],
-  common: [{ required: true, message: "请选择级联" }],
+  productClassifyId: [{ required: true, message: proxy.t('productLibrary.productClassificationCanNotBeEmpty') }],
+  type: [{ required: true, message: proxy.t('productLibrary.productTypeCanNotBeEmpty') }],
+  name: [{ required: true, message: proxy.t('productLibrary.productNameCanNotBeEmpty') }],
+  spec: [{ required: true, message: proxy.t('productLibrary.specificationModelCanNotBeEmpty') }],
+  unit: [{ required: true, message: proxy.t('productLibrary.unitCanNotBeEmpty') }],
+  select: [{ required: true, message: proxy.t('productLibrary.pleaseSelect') }],
+  date: [{ required: true, message: proxy.t('productLibrary.pleaseSelectTime') }],
+  common: [{ required: true, message: proxy.t('productLibrary.pleaseSelectCascader') }],
   // city: [{ required: true, message: "请选择城市" }],
 };
 const unitList = ref([]);
@@ -151,15 +151,12 @@ const getDict = () => {
 }
 getDict()
 const fileList = ref([]);
-const onOversize = () => {
-  showToast("文件大小不能超过 5MB");
-};
 const onClickLeft = () => history.back();
 const onSubmit = () => {
   console.log(formData)
   
   proxy.post("/productInfo/" + route.query.type, formData.data).then(() => {
-    showSuccessToast("添加成功");
+    showSuccessToast(proxy.t('common.addSuccess'));
     setTimeout(() => {
       history.back();
     }, 500);

+ 5 - 5
src/views/product-material/product-library/index.vue

@@ -1,6 +1,6 @@
 <template>
-  <van-nav-bar title="产品库" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
-    <template #right> 添加 </template>
+  <van-nav-bar :title="$t('productLibrary.name')" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
+    <template #right> {{$t('common.add')}} </template>
   </van-nav-bar>
   <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
@@ -29,15 +29,15 @@ const listData = ref([]);
 const classification = ref([]);
 const listConfig = ref([
   {
-    label: "产品分类",
+    label: proxy.t('productLibrary.productClassification'),
     prop: "productClassifyName",
   },
   {
-    label: "产品编码",
+    label: proxy.t('productLibrary.productCode'),
     prop: "code",
   },
   {
-    label: "产品名称",
+    label: proxy.t('productLibrary.productName'),
     prop: "name",
   },
 ]);

+ 6 - 6
src/views/production/technology/add.vue

@@ -166,24 +166,24 @@ const formConfig = reactive([
 	{
 		type: 'input',
 		itemType: 'text',
-		label: '车间名称',
+		label: proxy.$t('technology.workshopName'),
 		prop: 'name',
 		clearable: true,
 	},
 	{
 		type: 'slot',
-		label: '工艺线路',
+		label: proxy.$t('technology.processRoute'),
 		slotName: 'processRouteList',
 	},
 	{
 		type: 'slot',
-		label: '适用产品',
+		label: proxy.$t('technology.applicableProducts'),
 		slotName: 'applicableProductsList',
 	},
 ])
 const rules = {
-	name: [{ required: true, message: '车间类型不能为空' }],
-	fileList: [{ required: true, message: '请上传工序文件' }],
+	name: [{ required: true, message: proxy.$t('technology.workshopTypeCanNotBeEmpty') }],
+	fileList: [{ required: true, message: proxy.$t('technology.pleaseUploadProcessFile') }],
 }
 const unitList = ref([])
 let processRouteListData = ref([])
@@ -209,7 +209,7 @@ const onSubmit = () => {
 		.post('/technology/' + route.query.type, formData.data)
 		.then(() => {
 			showSuccessToast(
-				route.query.type === 'add' ? '添加成功' : '修改成功'
+				route.query.type === 'add' ? proxy.$t('common.addSuccess') : proxy.$t('common.editSuccess')
 			)
 			setTimeout(() => {
 				history.back()

+ 8 - 8
src/views/production/workingProcedure/add.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="form">
     <van-nav-bar
-      title="工序管理"
+      :title="$t('workingProcedure.name')"
       :left-text="$t('common.back')"
       left-arrow
       @click-left="onClickLeft"
@@ -47,25 +47,25 @@ const formConfig = reactive([
   {
     type: "input",
     itemType: "text",
-    label: "工序名称",
+    label: proxy.t('workingProcedure.processName'),
     prop: "name",
     clearable: true,
   },
   {
     type: "input",
     itemType: "textarea",
-    label: "工序说明",
+    label: proxy.t('workingProcedure.processDescription'),
     prop: "remarks",
   },
   {
     type: "upload",
-    label: "工序文件",
+    label: proxy.t('workingProcedure.processFile'),
     prop: "fileList",
   },
 ]);
 const rules = {
-  name: [{ required: true, message: "车间类型不能为空" }],
-  fileList: [{ required: true, message: "请上传工序文件" }],
+  name: [{ required: true, message:  proxy.t('workingProcedure.workshopTypeCanNotBeEmpty') }],
+  fileList: [{ required: true, message:  proxy.t('workingProcedure.pleaseUploadProcessFile') }],
 };
 const unitList = ref([]);
 
@@ -86,13 +86,13 @@ const onSubmit = () => {
     proxy
       .post("/productionProcesses/" + route.query.type, formData.data)
       .then(() => {
-        showSuccessToast(route.query.type === "add" ? "添加成功" : "修改成功");
+        showSuccessToast(route.query.type === "add" ? proxy.t('common.addSuccess') : proxy.t('common.modifySuccess'));
         setTimeout(() => {
           history.back();
         }, 500);
       });
   } else {
-    return showFailToast("请上传工序文件");
+    return showFailToast(proxy.t('workingProcedure.pleaseUploadProcessFile'));
   }
 };
 const treeToList = (arr) => {

+ 6 - 20
src/views/production/workingProcedure/index.vue

@@ -1,12 +1,12 @@
 <template>
 	<van-nav-bar
-		title="工序管理"
+		:title="$t('workingProcedure.name')"
 		left-text=""
 		left-arrow
 		@click-left="onClickLeft"
 		@click-right="onClickRight"
 	>
-		<template #right> 添加 </template>
+		<template #right> {{$t('common.add')}} </template>
 	</van-nav-bar>
 	<van-search
 		v-model="req.keyword"
@@ -49,33 +49,19 @@ const listData = ref([])
 const classification = ref([])
 const listConfig = ref([
 	{
-		label: '工序名称',
+		label: proxy.t('workingProcedure.processName'),
 		prop: 'name',
 	},
 	{
-		label: '工序说明',
+		label: proxy.t('workingProcedure.processDescription'),
 		prop: 'remarks',
 	},
 	{
-		label: '工序文件',
+		label: proxy.t('workingProcedure.processFile'),
 		prop: 'fileName',
 	},
 ])
-//车间类型
-const typeList = ref([
-	{
-		label: '普通车间',
-		value: '1',
-	},
-	{
-		label: '半自动化车间',
-		value: '2',
-	},
-	{
-		label: '自动化车间',
-		value: '3',
-	},
-])
+
 const onRefresh = () => {
 	req.value.pageNum = 1
 	finished.value = false

+ 12 - 15
src/views/production/workshop/add.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="form">
 		<van-nav-bar
-			title="车间配置"
+			:title="$t('workshop.name')"
 			:left-text="$t('common.back')"
 			left-arrow
 			@click-left="onClickLeft"
@@ -46,7 +46,7 @@ const formOption = reactive({
 const formConfig = reactive([
 	{
 		type: 'picker',
-		label: '车间类型',
+		label: proxy.t('workshop.workshopType'),
 		prop: 'type',
 		itemType: 'onePicker',
 		showPicker: false,
@@ -56,15 +56,15 @@ const formConfig = reactive([
 		},
 		data: [
 			{
-                label: '普通车间',
+                label: proxy.t('workshop.ordinaryWorkshop'),
                 value: 1,
             },
             {
-                label: '半自动化车间',
+                label: proxy.t('workshop.semiAutomaticWorkshop'),
                 value: 2,
             },
             {
-                label: '自动化车间',
+                label: proxy.t('workshop.automaticWorkshop'),
                 value: 3,
             },
 		],
@@ -72,13 +72,13 @@ const formConfig = reactive([
 	{
 		type: 'input',
 		itemType: 'text',
-		label: '车间名称',
+		label:  proxy.t('workshop.workshopName'),
 		prop: 'name',
 		clearable: true,
 	},
 	{
 		type: 'picker',
-		label: '负责人',
+		label: proxy.t('workshop.principal'),
 		prop: 'personLiableId',
 		itemType: 'onePicker',
 		showPicker: false,
@@ -96,14 +96,14 @@ const formConfig = reactive([
 	{
 		type: 'input',
 		itemType: 'textarea',
-		label: '备注',
+		label: proxy.t('workshop.remarks'),
 		prop: 'remarks',
 	},
 ])
 const rules = {
-	type: [{ required: true, message: '车间类型不能为空' }],
-	name: [{ required: true, message: '车间名称不能为空' }],
-	personLiableId: [{ required: true, message: '负责人不能为空' }],
+	type: [{ required: true, message:  proxy.t('workshop.workshopTypeCanNotBeEmpty') }],
+	name: [{ required: true, message:  proxy.t('workshop.workshopNameCanNotBeEmpty') }],
+	personLiableId: [{ required: true, message:  proxy.t('workshop.principalCanNotBeEmpty') }],
 }
 const unitList = ref([])
 
@@ -117,15 +117,12 @@ const getUserList = () => {
 }
 getUserList()
 const fileList = ref([])
-const onOversize = () => {
-	showToast('文件大小不能超过 5MB')
-}
 const onClickLeft = () => history.back()
 const onSubmit = () => {
 	console.log(formData)
 
 	proxy.post('/workshop/' + route.query.type, formData.data).then(() => {
-		showSuccessToast('添加成功')
+		showSuccessToast(proxy.t('common.addSuccess'))
 		setTimeout(() => {
 			history.back()
 		}, 500)

+ 8 - 8
src/views/production/workshop/index.vue

@@ -1,12 +1,12 @@
 <template>
 	<van-nav-bar
-		title="车间配置"
+		:title="$t('workshop.name')"
 		left-text=""
 		left-arrow
 		@click-left="onClickLeft"
 		@click-right="onClickRight"
 	>
-		<template #right> 添加 </template>
+		<template #right> {{$t('common.add')}} </template>
 	</van-nav-bar>
 	<van-search
 		v-model="req.keyword"
@@ -49,30 +49,30 @@ const listData = ref([])
 const classification = ref([])
 const listConfig = ref([
 	{
-		label: '车间名称',
+		label: proxy.t('workshop.workshopName'),
 		prop: 'name',
 	},
 	{
-		label: '负责人名称',
+		label: proxy.t('workshop.principalName'),
 		prop: 'personLiableName',
 	},
 	{
-		label: '车间类型',
+		label: proxy.t('workshop.workshopType'),
 		prop: 'typeName',
 	},
 ])
 //车间类型
 const typeList = ref([
 	{
-		label: '普通车间',
+		label: proxy.t('workshop.ordinaryWorkshop'),
 		value: '1',
 	},
 	{
-		label: '半自动化车间',
+		label: proxy.t('workshop.semiAutomaticWorkshop'),
 		value: '2',
 	},
 	{
-		label: '自动化车间',
+		label: proxy.t('workshop.automaticWorkshop'),
 		value: '3',
 	},
 ])