update: 更新支付明细 收入明细 以及所有禁用颜色设置
This commit is contained in:
		
							parent
							
								
									3f3b65c9a7
								
							
						
					
					
						commit
						10848775bc
					
				|  | @ -4,14 +4,14 @@ | |||
|       <u-input | ||||
|         v-model="state.startTime" | ||||
|         disabled | ||||
|         disabledColor="#ffffff" | ||||
|          | ||||
|         placeholder="请选择开始时间" | ||||
|       ></u-input> | ||||
|       <text>-</text> | ||||
|       <u-input | ||||
|         v-model="state.endTime" | ||||
|         disabled | ||||
|         disabledColor="#ffffff" | ||||
|          | ||||
|         placeholder="请选择结束时间" | ||||
|       ></u-input> | ||||
|       <u-icon | ||||
|  |  | |||
|  | @ -4,14 +4,14 @@ | |||
|       <u-input | ||||
|         v-model="state.startTime" | ||||
|         disabled | ||||
|         disabledColor="#ffffff" | ||||
|          | ||||
|         placeholder="请选择开始时间" | ||||
|       ></u-input> | ||||
|       <text>-</text> | ||||
|       <u-input | ||||
|         v-model="state.endTime" | ||||
|         disabled | ||||
|         disabledColor="#ffffff" | ||||
|          | ||||
|         placeholder="请选择结束时间" | ||||
|       ></u-input> | ||||
|       <u-icon | ||||
|  |  | |||
|  | @ -4,14 +4,14 @@ | |||
|       <u-input | ||||
|         v-model="state.startTime" | ||||
|         disabled | ||||
|         disabledColor="#ffffff" | ||||
|          | ||||
|         placeholder="请选择开始时间" | ||||
|       ></u-input> | ||||
|       <text>-</text> | ||||
|       <u-input | ||||
|         v-model="state.endTime" | ||||
|         disabled | ||||
|         disabledColor="#ffffff" | ||||
|          | ||||
|         placeholder="请选择结束时间" | ||||
|       ></u-input> | ||||
|       <u-icon | ||||
|  |  | |||
|  | @ -4,14 +4,14 @@ | |||
|       <u-input | ||||
|         v-model="state.startTime" | ||||
|         disabled | ||||
|         disabledColor="#ffffff" | ||||
|          | ||||
|         placeholder="请选择开始时间" | ||||
|       ></u-input> | ||||
|       <text>-</text> | ||||
|       <u-input | ||||
|         v-model="state.endTime" | ||||
|         disabled | ||||
|         disabledColor="#ffffff" | ||||
|          | ||||
|         placeholder="请选择结束时间" | ||||
|       ></u-input> | ||||
|       <u-icon | ||||
|  |  | |||
|  | @ -52,6 +52,7 @@ | |||
|               type="number" | ||||
|               size="small" | ||||
|               v-model="state.minPrice" | ||||
|               @change="(e:any) => {handleInput(e, {key: 'minPrice', name: '最低价'})}" | ||||
|             ></u-input | ||||
|           ></view> | ||||
|           - | ||||
|  | @ -64,6 +65,7 @@ | |||
|               type="number" | ||||
|               size="small" | ||||
|               v-model="state.maxPrice" | ||||
|               @change="(e:any) => {handleInput(e, {key: 'maxPrice', name: '最高价'})}" | ||||
|             ></u-input | ||||
|           ></view> | ||||
|         </view> | ||||
|  | @ -144,13 +146,89 @@ | |||
|       ></u-action-sheet> | ||||
|     </block> | ||||
|   </u-popup> | ||||
| 
 | ||||
|   <!-- 供应商选择弹框 --> | ||||
|   <SupplierDialog | ||||
|     ref="supplierDialog" | ||||
|     :show="showDialog.showSupplier" | ||||
|     @handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}" | ||||
|     @changeUser="changeUser" | ||||
|     :isShipment="isShipment" | ||||
|   ></SupplierDialog> | ||||
|   <!-- 收货产品弹框 --> | ||||
|   <ProductDialog | ||||
|     :show="showDialog.showProduct" | ||||
|     @handleDialog="(v:boolean) => {handleDialog('showProduct', v)}" | ||||
|     @changeProduct="changeProduct" | ||||
|     ref="productRef" | ||||
|     :isShipment="isShipment" | ||||
|   ></ProductDialog> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { CustomerApi, GoodsApi, ProfileApi, SupplierApi } from "@/services"; | ||||
| import SupplierDialog from "./SupplierDialog.vue"; | ||||
| import ProductDialog from "./ProductDialog.vue"; | ||||
| import _ from "underscore"; | ||||
| import valid from "@/utils/validate"; | ||||
| import { countDots } from "@/utils"; | ||||
| // 供应商选择 | ||||
| const showDialog = < | ||||
|   { | ||||
|     [key: string]: boolean; | ||||
|   } | ||||
| >reactive({ | ||||
|   showSupplier: false, | ||||
|   showProduct: false, | ||||
| }); | ||||
| 
 | ||||
| const handleDialog = (key: string, v: boolean) => { | ||||
|   showDialog[key] = v; | ||||
| }; | ||||
| 
 | ||||
| const changeUser = (obj: any) => { | ||||
|   state.userName = obj.name; // 供应商名称 | ||||
|   state.userId = obj.id; // 供应商Id, | ||||
| }; | ||||
| 
 | ||||
| // 收货产品选择 | ||||
| const changeProduct = (obj: any) => { | ||||
|   if (props.isShipment) { | ||||
|     state.productName = obj.shmProductsName; // 收货产品名称 | ||||
|   } else { | ||||
|     state.productName = obj.reProductsName; // 收货产品名称 | ||||
|   } | ||||
|   state.productId = obj.id; // 收货产品Id, | ||||
| }; | ||||
| 
 | ||||
| const handleInput = (e: any, item: any) => { | ||||
|   if (["minPrice", "maxPrice"].indexOf(item.key) > -1) { | ||||
|     const temp = e?.replace(valid.valid_decimal.pattern, ""); | ||||
|     if (countDots(temp).length > 1) { | ||||
|       uni.showToast({ | ||||
|         title: "请输入正确的" + item.name, | ||||
|         icon: "none", | ||||
|       }); | ||||
|     } | ||||
| 
 | ||||
|     if (item.key === "maxPrice" || item.key === "minPrice") { | ||||
|       if (state.minPrice && state.maxPrice && state.minPrice > state.maxPrice) { | ||||
|         uni.showToast({ | ||||
|           title: `最大值应小于最小值`, | ||||
|           icon: "none", | ||||
|         }); | ||||
|         return; | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     setTimeout(() => { | ||||
|       (state as any)[item.key] = temp; | ||||
|     }, 100); | ||||
|   } | ||||
| }; | ||||
| 
 | ||||
| const props = defineProps<{ | ||||
|   show: boolean; | ||||
|   isShipment: boolean | ||||
|   isShipment: boolean; | ||||
| }>(); | ||||
| const emit = defineEmits(["handleDialog", "handleOk"]); | ||||
| const handleClose = () => { | ||||
|  | @ -183,17 +261,20 @@ const formAttrList = reactive<any>([ | |||
|     name: "供应商", | ||||
|     childKey: "supplier", | ||||
|     fn: () => { | ||||
|       console.log("********"); | ||||
|       contrlModalParams.supplier.isShow = true; | ||||
|       contrlModalParams.supplier.title = "供应商"; | ||||
|       // contrlModalParams.supplier.isShow = true; | ||||
|       // contrlModalParams.supplier.title = "供应商"; | ||||
|       handleDialog("showSupplier", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|     name: "收货产品", | ||||
|     childKey: "product", | ||||
|     fn: () => { | ||||
|       contrlModalParams.product.isShow = true; | ||||
|       contrlModalParams.product.title = "收货产品"; | ||||
|       // contrlModalParams.product.isShow = true; | ||||
|       // contrlModalParams.product.title = "收货产品"; | ||||
|       handleDialog("showProduct", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|  | @ -211,16 +292,20 @@ const formAttrList1 = reactive<any>([ | |||
|     name: "客户", | ||||
|     childKey: "customer", | ||||
|     fn: () => { | ||||
|       contrlModalParams.customer.isShow = true; | ||||
|       contrlModalParams.customer.title = "客户"; | ||||
|       // contrlModalParams.customer.isShow = true; | ||||
|       // contrlModalParams.customer.title = "客户"; | ||||
|       handleDialog("showSupplier", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|     name: "出货产品", | ||||
|     childKey: "shipmentProduct", | ||||
|     fn: () => { | ||||
|       contrlModalParams.shipmentProduct.isShow = true; | ||||
|       contrlModalParams.shipmentProduct.title = "出货产品"; | ||||
|       // contrlModalParams.shipmentProduct.isShow = true; | ||||
|       // contrlModalParams.shipmentProduct.title = "出货产品"; | ||||
|       handleDialog("showProduct", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
| ]); | ||||
|  | @ -324,7 +409,6 @@ GoodsApi.getShipmentProductList().then((res) => { | |||
|   } | ||||
| }); | ||||
| 
 | ||||
| 
 | ||||
| // 重置 确定 | ||||
| const resetState = () => { | ||||
|   state.userId = null; // 供应商ID | ||||
|  | @ -336,11 +420,22 @@ const resetState = () => { | |||
|   state.minPrice = null; | ||||
|   state.maxPrice = null; | ||||
|   currentSpl.value = null; | ||||
|   deliveryMethod.value = null | ||||
|   deliveryMethod.value = null; | ||||
| }; | ||||
| 
 | ||||
| const getFilter = () => { | ||||
|   emit("handleOk", { ...state, repairFlag: currentSpl.value, deliveryMethod: deliveryMethod.value }); | ||||
|   if (state.minPrice && state.maxPrice && state.minPrice > state.maxPrice) { | ||||
|     uni.showToast({ | ||||
|       title: `最大值应小于最小值`, | ||||
|       icon: "none", | ||||
|     }); | ||||
|     return; | ||||
|   } | ||||
|   emit("handleOk", { | ||||
|     ...state, | ||||
|     repairFlag: currentSpl.value, | ||||
|     deliveryMethod: deliveryMethod.value, | ||||
|   }); | ||||
|   emit("handleDialog", false); | ||||
| }; | ||||
| </script> | ||||
|  |  | |||
|  | @ -0,0 +1,165 @@ | |||
| <template> | ||||
|   <u-popup :show="show" mode="left" :closeable="true" @close="handleClose"> | ||||
|     <view class="c-dialog-filter"> | ||||
|       <view class="title">{{ isShipment ? "出货" : "收货" }}产品</view> | ||||
|       <view v-if="isShipment"> | ||||
|         <view v-for="(item, index) in state.list" :key="index"> | ||||
|           <view class="first-title">{{ item.shmCategoryName }}</view> | ||||
|           <view v-for="(cItem, cIndex) in item.childrenList" :key="cIndex"> | ||||
|             <view class="second-title">{{ cItem.shmCategoryName }}</view> | ||||
| 
 | ||||
|             <view class="dialog-product-layout"> | ||||
|               <view v-if="cItem.childrenLists"> | ||||
|                 <text | ||||
|                   v-for="(child, childIndex) in cItem.childrenLists" | ||||
|                   :key="childIndex" | ||||
|                   :class="{ active: state.current === child.childIndex }" | ||||
|                   @click="handleSelect(child)" | ||||
|                   >{{ child.shmProductsName }}</text | ||||
|                 > | ||||
|               </view> | ||||
| 
 | ||||
|               <view v-else style="flex: auto"> | ||||
|                 <u-empty | ||||
|                   mode="data" | ||||
|                   icon="http://cdn.uviewui.com/uview/empty/data.png" | ||||
|                 > | ||||
|                 </u-empty> | ||||
|               </view> | ||||
|             </view> | ||||
|           </view> | ||||
|         </view> | ||||
|       </view> | ||||
|       <view class="dialog-product-layout" v-else> | ||||
|         <text | ||||
|           v-for="(item, index) in state.list" | ||||
|           :class="{ active: state.current === item.id }" | ||||
|           @click="handleSelect(item)" | ||||
|           :key="index" | ||||
|           >{{ isShipment ? item.shmProductsName : item.reProductsName }}</text | ||||
|         > | ||||
|       </view> | ||||
|     </view> | ||||
|   </u-popup> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { ReceiveProductApi, GoodsApi } from "@/services"; | ||||
| 
 | ||||
| const props = defineProps<{ | ||||
|   show: boolean; | ||||
|   isShipment: boolean; | ||||
| }>(); | ||||
| const emit = defineEmits(["handleDialog", "changeProduct"]); | ||||
| const handleClose = () => { | ||||
|   emit("handleDialog", false); | ||||
| }; | ||||
| const state = reactive<any>({ | ||||
|   list: [], | ||||
|   current: -1, | ||||
| }); | ||||
| 
 | ||||
| const handleSelect = (item: any) => { | ||||
|   state.current = item.id; | ||||
|   emit("changeProduct", item); | ||||
|   emit("handleDialog", false); | ||||
| }; | ||||
| const getList = () => { | ||||
|   if (props.isShipment) { | ||||
|     // GoodsApi.getShipmentProductList().then((res) => { | ||||
|     //   if (res.code === 200) { | ||||
|     //     state.list = res.data; | ||||
|     //   } | ||||
|     // }); | ||||
| 
 | ||||
|     GoodsApi.getChildrenList().then((res) => { | ||||
|       if (res.code === 200) { | ||||
|         if (res.code === 200) { | ||||
|           state.list = res.data; | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
|   } else { | ||||
|     ReceiveProductApi.getAllReProducts().then((res) => { | ||||
|       if (res.code === 200) { | ||||
|         state.list = res.data; | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| }; | ||||
| onMounted(() => { | ||||
|   getList(); | ||||
| }); | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
| .c-dialog-filter { | ||||
|   width: 95vw; | ||||
|   padding: 25rpx; | ||||
|   height: 90vh; | ||||
|   overflow-y: scroll; | ||||
|   .title { | ||||
|     font-weight: 500; | ||||
|     font-size: 32rpx; | ||||
|     color: #000000; | ||||
|     text-align: center; | ||||
|   } | ||||
| } | ||||
| .first-title { | ||||
|   font-size: 28rpx; | ||||
|   font-weight: 500; | ||||
| } | ||||
| .second-title { | ||||
|   font-size: 26rpx; | ||||
|   font-weight: 500; | ||||
|   color: rgba(0, 0, 0, 0.7); | ||||
|   margin: 20rpx; | ||||
| } | ||||
| // 产品dialog | ||||
| .dialog-product-layout { | ||||
|   box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12); | ||||
|   border-radius: 13rpx; | ||||
|   margin: 30rpx 24rpx; | ||||
|   padding: 20rpx; | ||||
|   display: flex; | ||||
|   justify-content: flex-start; | ||||
|   align-items: center; | ||||
|   flex-flow: row wrap; | ||||
|   max-height: 70vh; | ||||
|   overflow: auto; | ||||
| 
 | ||||
|   text { | ||||
|     font-weight: 400; | ||||
|     font-size: 26rpx; | ||||
|     color: #999999; | ||||
|     background: #ffffff; | ||||
|     border-radius: 6rpx; | ||||
|     border: 1px solid rgba(153, 153, 153, 0.64); | ||||
|     text-align: center; | ||||
|     cursor: pointer; | ||||
|     padding: 0rpx 20rpx; | ||||
|     margin-bottom: 20rpx; | ||||
|     margin-left: 10rpx; | ||||
|     margin-right: 10rpx; | ||||
|   } | ||||
|   .active { | ||||
|     border-color: $u-primary; | ||||
|     color: $u-primary; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| .btn-confirm { | ||||
|   box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12); | ||||
|   border-radius: 13rpx 13rpx 0rpx 0rpx; | ||||
|   position: absolute; | ||||
|   bottom: 0rpx; | ||||
|   width: 100%; | ||||
|   left: 0rpx; | ||||
|   padding: 27.56rpx; | ||||
|   .btn { | ||||
|     text-align: center; | ||||
|     ::v-deep button { | ||||
|       width: 80%; | ||||
|       border-radius: 43rpx; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|  | @ -32,7 +32,7 @@ | |||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.type === 'select'" | ||||
|           disabledColor="#ffffff" | ||||
|           :disabledColor="['卡号'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text> | ||||
|  |  | |||
|  | @ -31,7 +31,8 @@ | |||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.disabled" | ||||
|           :disabled="item.disabled || item.type === 'select'" | ||||
|           :disabledColor="['客户','结算时间', '结算方式'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text> | ||||
|  | @ -73,10 +74,7 @@ | |||
|       @confirm="(v: any) => {handleTime(v)}" | ||||
|       @cancel="contrlModalParams.isShowSplTime = false" | ||||
|     ></u-datetime-picker> | ||||
|     <block | ||||
|       v-for="(item, index) in formAttrList" | ||||
|       :key="index" | ||||
|     > | ||||
|     <block v-for="(item, index) in formAttrList" :key="index"> | ||||
|       <u-action-sheet | ||||
|         v-if="item.type === 'select' && item.key !== 'settlementTime'" | ||||
|         :actions="contrlModalParams[item.childKey].list" | ||||
|  | @ -91,21 +89,38 @@ | |||
|   <view class="btn-box"> | ||||
|     <u-button type="primary" text="保存" @click="save()"></u-button> | ||||
|   </view> | ||||
|   <!-- 供应商选择弹框 --> | ||||
|   <SupplierDialog | ||||
|     ref="supplierDialog" | ||||
|     :show="showDialog.showSupplier" | ||||
|     @handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}" | ||||
|     @changeUser="changeUser" | ||||
|     :isShipment="true" | ||||
|   ></SupplierDialog> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { | ||||
|   CustomerApi, | ||||
|   DeviceApi, | ||||
|   FinanceApi, | ||||
|   PictureApi, | ||||
|   ProfileApi, | ||||
|   ReceiveApi, | ||||
|   ReceiveProductApi, | ||||
|   SupplierApi, | ||||
| } from "@/services"; | ||||
| import { CustomerApi, FinanceApi, PictureApi } from "@/services"; | ||||
| import { formatDate } from "@/utils"; | ||||
| import { DeviceType, ImagesType, OrderType } from "@/utils/enum"; | ||||
| import _ from "underscore"; | ||||
| // 供应商选择 | ||||
| const showDialog = < | ||||
|   { | ||||
|     [key: string]: boolean; | ||||
|   } | ||||
| >reactive({ | ||||
|   showSupplier: false, | ||||
|   showProduct: false, | ||||
| }); | ||||
| 
 | ||||
| const handleDialog = (key: string, v: boolean) => { | ||||
|   showDialog[key] = v; | ||||
| }; | ||||
| 
 | ||||
| const changeUser = (obj: any) => { | ||||
|   model1.order.customerName = obj.name; | ||||
|   model1.order.customerId = obj.id; | ||||
| }; | ||||
| 
 | ||||
| const model1 = reactive<any>({ | ||||
|   order: { | ||||
|  | @ -114,7 +129,7 @@ const model1 = reactive<any>({ | |||
|     settlementTime: "", | ||||
|   }, | ||||
|   supplierList: [], | ||||
|   customerList: [] | ||||
|   customerList: [], | ||||
| }); | ||||
| const rules = reactive({ | ||||
|   "order.supCusName": { | ||||
|  | @ -150,7 +165,7 @@ const rules = reactive({ | |||
| }); | ||||
| const contrlModalParams = reactive<any>({ | ||||
|   isShowSplTime: false, | ||||
|   spltime:  Number(new Date()), | ||||
|   settlementTime: Number(new Date()), | ||||
|   user: { | ||||
|     isShow: false, | ||||
|     title: "标题", | ||||
|  | @ -189,8 +204,10 @@ const formAttrList = reactive<any>([ | |||
|     required: true, | ||||
|     unit: "", | ||||
|     fn: () => { | ||||
|       contrlModalParams.user.isShow = true; | ||||
|       contrlModalParams.user.title = "客户"; | ||||
|       // contrlModalParams.user.isShow = true; | ||||
|       // contrlModalParams.user.title = "客户"; | ||||
|       handleDialog("showSupplier", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|  | @ -234,18 +251,13 @@ const formAttrList = reactive<any>([ | |||
|   }, | ||||
| ]); | ||||
| // 监听毛重 皮重 | ||||
| watch( | ||||
|   [ | ||||
|     () => model1.order.buttonType, | ||||
|   ], | ||||
|   ([buttonTypeNew]) => { | ||||
|     if (buttonTypeNew === 3) { | ||||
|       contrlModalParams.user.list = model1.supplierList; | ||||
|     } else if (buttonTypeNew === 2) { | ||||
|       contrlModalParams.user.list = model1.customerList; | ||||
|     } | ||||
| watch([() => model1.order.buttonType], ([buttonTypeNew]) => { | ||||
|   if (buttonTypeNew === 3) { | ||||
|     contrlModalParams.user.list = model1.supplierList; | ||||
|   } else if (buttonTypeNew === 2) { | ||||
|     contrlModalParams.user.list = model1.customerList; | ||||
|   } | ||||
| ); | ||||
| }); | ||||
| 
 | ||||
| const handleDelete = (e: any) => { | ||||
|   console.log(model1.order.fileLists); | ||||
|  | @ -352,7 +364,7 @@ const save = () => { | |||
| }; | ||||
| 
 | ||||
| const startSave = () => { | ||||
|   model1.order.paymentType = 1 // 手动添加默认其他付款 | ||||
|   model1.order.paymentType = 1; // 手动添加默认其他付款 | ||||
|   FinanceApi.addIncome(model1.order).then((res) => { | ||||
|     if (res.code === 200) { | ||||
|       model1.order.id = res.data; | ||||
|  |  | |||
|  | @ -33,7 +33,9 @@ | |||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.disabled" | ||||
|           :disabled="item.disabled || item.type === 'select'" | ||||
|           :disabledColor="['供应商','客户','结算时间', '结算方式'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|           @change="(e:any) => {handleInput(e, item)}" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text> | ||||
|  | @ -95,21 +97,60 @@ | |||
|   <view class="btn-box"> | ||||
|     <u-button type="primary" text="保存" @click="save()"></u-button> | ||||
|   </view> | ||||
| 
 | ||||
|   <!-- 供应商选择弹框 --> | ||||
|   <SupplierDialog | ||||
|     ref="supplierDialog" | ||||
|     :show="showDialog.showSupplier" | ||||
|     @handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}" | ||||
|     @changeUser="changeUser" | ||||
|     :isShipment="model1.order.buttonType === 2" | ||||
|   ></SupplierDialog> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { | ||||
|   CustomerApi, | ||||
|   DeviceApi, | ||||
|   FinanceApi, | ||||
|   PictureApi, | ||||
|   ProfileApi, | ||||
|   ReceiveApi, | ||||
|   ReceiveProductApi, | ||||
|   SupplierApi, | ||||
| } from "@/services"; | ||||
| import { formatDate } from "@/utils"; | ||||
| import { DeviceType, ImagesType, OrderType } from "@/utils/enum"; | ||||
| import { CustomerApi, FinanceApi, PictureApi, SupplierApi } from "@/services"; | ||||
| import { countDots, formatDate } from "@/utils"; | ||||
| import { ImagesType, OrderType } from "@/utils/enum"; | ||||
| import _ from "underscore"; | ||||
| import SupplierDialog from "./SupplierDialog.vue"; | ||||
| import valid from "@/utils/validate"; | ||||
| // 供应商选择 | ||||
| const showDialog = < | ||||
|   { | ||||
|     [key: string]: boolean; | ||||
|   } | ||||
| >reactive({ | ||||
|   showSupplier: false, | ||||
|   showProduct: false, | ||||
| }); | ||||
| 
 | ||||
| const handleDialog = (key: string, v: boolean) => { | ||||
|   showDialog[key] = v; | ||||
| }; | ||||
| 
 | ||||
| const changeUser = (obj: any) => { | ||||
|   model1.order.supCusName = obj.name; | ||||
|   model1.order.supCusId = obj.id; | ||||
| }; | ||||
| 
 | ||||
| // 供应商(金额) 客户(杂费 运费)校验 | ||||
| const handleInput = (e: any, item: any) => { | ||||
|   if ( | ||||
|     ["totalPrice", "incidentals", "freight"].indexOf(item.key) > -1 | ||||
|   ) { | ||||
|     const temp = e?.replace(valid.valid_decimal.pattern, ""); | ||||
|     if (countDots(temp).length > 1) { | ||||
|       uni.showToast({ | ||||
|         title: "请输入正确的" + item.name, | ||||
|         icon: "none", | ||||
|       }); | ||||
|     } | ||||
| 
 | ||||
|     setTimeout(() => { | ||||
|       model1.order[item.key] = temp; | ||||
|     }, 100); | ||||
|   } | ||||
| }; | ||||
| 
 | ||||
| const model1 = reactive<any>({ | ||||
|   order: { | ||||
|  | @ -118,7 +159,7 @@ const model1 = reactive<any>({ | |||
|     settlementTime: "", | ||||
|   }, | ||||
|   supplierList: [], | ||||
|   customerList: [] | ||||
|   customerList: [], | ||||
| }); | ||||
| const rules1 = reactive({ | ||||
|   "order.supCusName": { | ||||
|  | @ -180,7 +221,7 @@ const rules2 = reactive({ | |||
| }); | ||||
| const contrlModalParams = reactive<any>({ | ||||
|   isShowSplTime: false, | ||||
|   spltime:  Number(new Date()), | ||||
|   settlementTime: Number(new Date()), | ||||
|   user: { | ||||
|     isShow: false, | ||||
|     title: "标题", | ||||
|  | @ -225,8 +266,10 @@ const formAttrList1 = reactive<any>([ | |||
|     required: true, | ||||
|     unit: "", | ||||
|     fn: () => { | ||||
|       contrlModalParams.user.isShow = true; | ||||
|       contrlModalParams.user.title = "供应商"; | ||||
|       // contrlModalParams.user.isShow = true; | ||||
|       // contrlModalParams.user.title = "供应商"; | ||||
|       handleDialog("showSupplier", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|  | @ -285,8 +328,10 @@ const formAttrList2 = reactive<any>([ | |||
|     required: true, | ||||
|     unit: "", | ||||
|     fn: () => { | ||||
|       contrlModalParams.user.isShow = true; | ||||
|       contrlModalParams.user.title = "客户"; | ||||
|       // contrlModalParams.user.isShow = true; | ||||
|       // contrlModalParams.user.title = "客户"; | ||||
|       handleDialog("showSupplier", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|  | @ -336,19 +381,18 @@ const formAttrList2 = reactive<any>([ | |||
|     type: "upload", | ||||
|   }, | ||||
| ]); | ||||
| // 监听毛重 皮重 | ||||
| watch( | ||||
|   [ | ||||
|     () => model1.order.buttonType, | ||||
|   ], | ||||
|   ([buttonTypeNew]) => { | ||||
|     if (buttonTypeNew === 3) { | ||||
|       contrlModalParams.user.list = model1.supplierList; | ||||
|     } else if (buttonTypeNew === 2) { | ||||
|       contrlModalParams.user.list = model1.customerList; | ||||
|     } | ||||
| // 监听付款类型 | ||||
| watch([() => model1.order.buttonType], ([buttonTypeNew]) => { | ||||
|   if (buttonTypeNew === 3) { | ||||
|     contrlModalParams.user.list = model1.supplierList; | ||||
|     model1.order.paymentMethodName = ""; | ||||
|     model1.order.paymentMethod = ""; | ||||
|   } else if (buttonTypeNew === 2) { | ||||
|     contrlModalParams.user.list = model1.customerList; | ||||
|     model1.order.supCusName = ""; | ||||
|     model1.order.supCusId = ""; | ||||
|   } | ||||
| ); | ||||
| }); | ||||
| 
 | ||||
| const handleDelete = (e: any) => { | ||||
|   console.log(model1.order.fileLists); | ||||
|  | @ -454,13 +498,13 @@ const save = () => { | |||
| }; | ||||
| 
 | ||||
| const startSave = () => { | ||||
|   model1.order.paymentType = model1.order.buttonType | ||||
|   model1.order.paymentType = model1.order.buttonType; | ||||
|   if (model1.order.buttonType === 2) { | ||||
|     model1.order.totalPrice = parseInt(model1.order.freight) + parseInt(model1.order.incidentals) | ||||
|     model1.order.totalPrice = | ||||
|       parseInt(model1.order.freight) + parseInt(model1.order.incidentals); | ||||
|   } | ||||
|   FinanceApi.addPaymentDetails(model1.order).then((res) => { | ||||
|     if (res.code === 200) { | ||||
|        | ||||
|       model1.order.id = res.data; | ||||
|       upload(); | ||||
|       uni.redirectTo({ | ||||
|  |  | |||
|  | @ -31,6 +31,9 @@ | |||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.type === 'select'" | ||||
|           :disabledColor="['收货分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|           @change="(e:any) => {handleInput(e, item)}" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text> | ||||
|  | @ -62,11 +65,64 @@ | |||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { GoodsApi } from "@/services"; | ||||
| import { formatDate } from "@/utils"; | ||||
| import { DeviceType, ImagesType, OrderType } from "@/utils/enum"; | ||||
| import { countDots } from "@/utils"; | ||||
| import valid from "@/utils/validate"; | ||||
| import { onLoad } from "@dcloudio/uni-app"; | ||||
| import _ from "underscore"; | ||||
| // 最低价 最高价 常用价格 | ||||
| const handleInput = (e: any, item: any) => { | ||||
|   if (["minPrice", "maxPrice", "commonPrice"].indexOf(item.key) > -1) { | ||||
|     const temp = e?.replace(valid.valid_decimal.pattern, ""); | ||||
|     if (countDots(temp).length > 1) { | ||||
|       uni.showToast({ | ||||
|         title: "请输入正确的" + item.name, | ||||
|         icon: "none", | ||||
|       }); | ||||
|     } | ||||
|     if (item.key === "maxPrice") { | ||||
|       if (model1.formData.minPrice > model1.formData.maxPrice) { | ||||
|         uni.showToast({ | ||||
|           title: `${item.name}应小于${model1.formData.maxPrice}`, | ||||
|           icon: "none", | ||||
|         }); | ||||
|         return; | ||||
|       } | ||||
|     } | ||||
|     if (item.key === "commonPrice") { | ||||
|       if (model1.formData.minPrice > -1 && model1.formData.maxPrice > -1) { | ||||
|         if ( | ||||
|           temp < model1.formData.minPrice || | ||||
|           temp > model1.formData.maxPrice | ||||
|         ) { | ||||
|           uni.showToast({ | ||||
|             title: `${item.name}应在${model1.formData.minPrice}-${model1.formData.maxPrice}之间`, | ||||
|             icon: "none", | ||||
|           }); | ||||
|           return; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     setTimeout(() => { | ||||
|       model1.formData[item.key] = temp; | ||||
|     }, 100); | ||||
|   } | ||||
|   if (item.key === "subtractNum") { | ||||
|     const temp = e?.replace(valid.valid_decimal.pattern, ""); | ||||
|     if ( | ||||
|       model1.order.buttonType === 1 && | ||||
|       (parseInt(temp) > 100 || parseInt(temp) < 0) | ||||
|     ) { | ||||
|       uni.showToast({ | ||||
|         title: `${item.name}正确范围是0-100`, | ||||
|         icon: "none", | ||||
|       }); | ||||
|     } | ||||
|     setTimeout(() => { | ||||
|       model1.order[item.key] = temp; | ||||
|     }, 100); | ||||
|   } | ||||
| }; | ||||
| const model1 = reactive<any>({ | ||||
|   formData: {}, | ||||
| }); | ||||
|  | @ -74,7 +130,7 @@ const rules = ref({ | |||
|   "formData.reProductsName": { | ||||
|     type: "string", | ||||
|     required: true, | ||||
|     message: "请输入货产品", | ||||
|     message: "请输入收货产品", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "formData.reCategoryName": { | ||||
|  | @ -83,28 +139,28 @@ const rules = ref({ | |||
|     message: "请选择收货分类", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "formData.substationName": { | ||||
|     type: "string", | ||||
|     required: true, | ||||
|     message: "请输入所属分站", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   // "formData.substationName": { | ||||
|   //   type: "string", | ||||
|   //   required: true, | ||||
|   //   message: "请输入所属分站", | ||||
|   //   trigger: ["blur", "change"], | ||||
|   // }, | ||||
|   "formData.minPrice": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入最低价", | ||||
|     message: "最低价为空或输入错误", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "formData.maxPrice": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入最高价", | ||||
|     message: "最高价为空或输入错误", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "formData.commonPrice": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入常用价格", | ||||
|     message: "常用价格为空或输入错误", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
| }); | ||||
|  | @ -136,13 +192,13 @@ const formAttrList = reactive<any>([ | |||
|       contrlModalParams.reCategory.title = "收货分类"; | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|     name: "所属分站", | ||||
|     key: "substationName", | ||||
|     type: "input", | ||||
|     required: true, | ||||
|     unit: "", | ||||
|   }, | ||||
|   // { | ||||
|   //   name: "所属分站", | ||||
|   //   key: "substationName", | ||||
|   //   type: "input", | ||||
|   //   required: true, | ||||
|   //   unit: "", | ||||
|   // }, | ||||
|   { | ||||
|     name: "最低价", | ||||
|     key: "minPrice", | ||||
|  | @ -193,6 +249,24 @@ const check = () => { | |||
| }; | ||||
| 
 | ||||
| const save = () => { | ||||
|   if (model1.formData.minPrice > model1.formData.maxPrice) { | ||||
|     uni.showToast({ | ||||
|       title: `最低价应小于${model1.formData.maxPrice}`, | ||||
|       icon: "none", | ||||
|     }); | ||||
|     return; | ||||
|   } | ||||
|   if (model1.formData.minPrice > -1 && model1.formData.maxPrice > -1) { | ||||
|     const temp = model1.formData.commonPrice; | ||||
|     if (temp < model1.formData.minPrice || temp > model1.formData.maxPrice) { | ||||
|       uni.showToast({ | ||||
|         title: `常用价格应在${model1.formData.minPrice}-${model1.formData.maxPrice}之间`, | ||||
|         icon: "none", | ||||
|       }); | ||||
|       return; | ||||
|     } | ||||
|   } | ||||
|   console.log(model1.formData); | ||||
|   check().then((res) => { | ||||
|     if (res) { | ||||
|       startSave(); | ||||
|  | @ -236,13 +310,16 @@ onMounted(() => { | |||
| onLoad((option) => { | ||||
|   // 接收传递的标题参数 | ||||
|   const title = (option as any).title; | ||||
|   model1.formData = JSON.parse((option as any).item); | ||||
|   if (model1.formData.cardCode) { | ||||
|     model1.formData.stockCardName = model1.formData.cardCode; | ||||
|   if ((option as any).item) { | ||||
|     model1.formData = JSON.parse((option as any).item); | ||||
|     if (model1.formData.cardCode) { | ||||
|       model1.formData.stockCardName = model1.formData.cardCode; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   // 设置页面标题 | ||||
|   uni.setNavigationBarTitle({ | ||||
|     title: title, | ||||
|     title: title || '新增收货产品', | ||||
|   }); | ||||
| }); | ||||
| </script> | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
|       :errorType="'border-bottom'" | ||||
|     > | ||||
|       <u-form-item | ||||
|       :prop="`formData.${item.key}`" | ||||
|         :prop="`formData.${item.key}`" | ||||
|         :label="item.name" | ||||
|         :required="item.required" | ||||
|         v-for="(item, index) in formAttrList" | ||||
|  | @ -35,6 +35,8 @@ | |||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.type === 'cascader'" | ||||
|           :disabledColor="['出货分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text> | ||||
|  | @ -227,17 +229,19 @@ onMounted(() => { | |||
| onLoad((option) => { | ||||
|   // 接收传递的标题参数 | ||||
|   const title = (option as any).title; | ||||
|   model1.formData = JSON.parse((option as any).item) || {}; | ||||
|   if (option) { | ||||
|     if (model1.formData.shmCategoryName) { | ||||
|       model1.formData.reCategoryName = model1.formData.shmCategoryName; | ||||
|   if ((option as any).item) { | ||||
|     model1.formData = JSON.parse((option as any).item) || {}; | ||||
|     if (option) { | ||||
|       if (model1.formData.shmCategoryName) { | ||||
|         model1.formData.reCategoryName = model1.formData.shmCategoryName; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   // 设置页面标题 | ||||
|   if (title) { | ||||
|     uni.setNavigationBarTitle({ | ||||
|       title: title, | ||||
|       title: title || "新增出货产品", | ||||
|     }); | ||||
|   } | ||||
| }); | ||||
|  |  | |||
|  | @ -31,6 +31,8 @@ | |||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.type === 'select'" | ||||
|           :disabledColor="['上级菜单'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text> | ||||
|  | @ -61,8 +63,6 @@ | |||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { GoodsApi } from "@/services"; | ||||
| import { formatDate } from "@/utils"; | ||||
| import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum"; | ||||
| import { onLoad } from "@dcloudio/uni-app"; | ||||
| import _ from "underscore"; | ||||
| 
 | ||||
|  | @ -104,8 +104,12 @@ const formAttrList = reactive<any>([ | |||
|     required: true, | ||||
|     childKey: "parent", | ||||
|     fn: () => { | ||||
|       // 若是编辑并且是父菜单则不可编辑分类 | ||||
|       if (model1.formData.id && model1.formData.parentId === 0) { | ||||
|         return; | ||||
|       } | ||||
|       contrlModalParams.parent.isShow = true; | ||||
|       contrlModalParams.parent.title = "库存卡类型"; | ||||
|       contrlModalParams.parent.title = "出货分类"; | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|  | @ -150,7 +154,11 @@ const save = () => { | |||
| }; | ||||
| const startSave = () => { | ||||
|   if (model1.formData.id) { | ||||
|     GoodsApi.editReceiveCategory(model1.formData).then((res) => { | ||||
|     GoodsApi.editShipmentCategory({ | ||||
|       id: model1.formData.id, | ||||
|       shmCategoryName: model1.formData.name, | ||||
|       parentId: model1.formData.parentId, | ||||
|     }).then((res) => { | ||||
|       if (res.code === 200) { | ||||
|         uni.redirectTo({ | ||||
|           url: "/pagesApp/shipmentType", // 要跳转到的页面路径 | ||||
|  | @ -169,8 +177,34 @@ const startSave = () => { | |||
| }; | ||||
| 
 | ||||
| onLoad((option) => { | ||||
|   GoodsApi.allShmCategory().then((res: any) => { | ||||
|     if (res.code === 200) { | ||||
|       contrlModalParams.parent.list = [ | ||||
|         { | ||||
|           id: 0, | ||||
|           name: "主分类", | ||||
|         }, | ||||
|       ].concat( | ||||
|         res.data.map((item: any) => { | ||||
|           return { ...item, name: item.shmCategoryName }; | ||||
|         }) | ||||
|       ); | ||||
|     } | ||||
|   }); | ||||
|   // 接收传递的标题参数 | ||||
|   const title = (option as any).title; | ||||
|   const obj = JSON.parse((option as any).item); | ||||
|   model1.formData = obj; | ||||
|   model1.formData.shmCategoryName = obj.shmCategoryName; | ||||
|   if (obj.parentId === 0) { | ||||
|     model1.formData.parentName = "主菜单"; | ||||
|   } else { | ||||
|     GoodsApi.getShipmentCategoryById({ id: obj.parentId }).then((res: any) => { | ||||
|       if (res.code === 200) { | ||||
|         model1.formData.parentName = res.data.shmCategoryName; | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|   // 设置页面标题 | ||||
|   uni.setNavigationBarTitle({ | ||||
|     title: title, | ||||
|  |  | |||
|  | @ -32,7 +32,7 @@ | |||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.type === 'selectCustom'" | ||||
|           disabledColor="#ffffff" | ||||
|           :disabledColor="['类型'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text> | ||||
|  |  | |||
|  | @ -33,7 +33,7 @@ | |||
|           border="none" | ||||
|           @change="(e:any) => {handleInput(e, item)}" | ||||
|           :disabled="item.type === 'select'" | ||||
|           disabledColor="#ffffff" | ||||
|           :disabledColor="['卡号', '供应商分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text> | ||||
|  |  | |||
|  | @ -35,7 +35,7 @@ | |||
|           :maxlength="item.key === 'password' ? 6 : -1" | ||||
|           @change="(e:any) => {handleInput(e, item)}" | ||||
|           :disabled="item.type === 'select'" | ||||
|           disabledColor="#ffffff" | ||||
|           :disabledColor="['性别', '用户角色'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text> | ||||
|  |  | |||
|  | @ -139,7 +139,11 @@ | |||
| import { ReceiveApi } from "@/services"; | ||||
| import { ScaleStatus } from "@/utils/enum"; | ||||
| import PageView from "@/components/PageView/index.vue"; | ||||
| import { formatDate, getCurrentMonthStartAndEnd, filterNullUndefined } from "@/utils"; | ||||
| import { | ||||
|   formatDate, | ||||
|   getCurrentMonthStartAndEnd, | ||||
|   filterNullUndefined, | ||||
| } from "@/utils"; | ||||
| import TimeDialog from "./components/TimeDialog.vue"; | ||||
| import FilterDialog from "./components/FilterDialog.vue"; | ||||
| const showDialog = < | ||||
|  | @ -165,10 +169,14 @@ const state = reactive({ | |||
|   startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}"), | ||||
|   endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}"), | ||||
|   name: "本月", | ||||
|   currentScaleStatus: undefined, | ||||
|   currentScaleStatus: -1, | ||||
|   currentSortName: undefined, | ||||
|   isShowStatus: false, | ||||
|   statusList: [ | ||||
|     { | ||||
|       name: "全部", | ||||
|       key: -1, | ||||
|     }, | ||||
|     { | ||||
|       name: "待定价", | ||||
|       key: 0, | ||||
|  | @ -351,7 +359,7 @@ const getList = (v?: boolean) => { | |||
|     startTime: state.startTime + " 00:00:00", | ||||
|     endTime: state.endTime + " 23:59:59", | ||||
|   }; | ||||
|   if (state.currentScaleStatus !== undefined) { | ||||
|   if (state.currentScaleStatus > -1) { | ||||
|     params.scaleStatus = state.currentScaleStatus; | ||||
|   } | ||||
|   if (state.currentSortName !== undefined) { | ||||
|  | @ -361,7 +369,10 @@ const getList = (v?: boolean) => { | |||
|     params.receiptNumber = keyword.value; | ||||
|   } | ||||
|   pageList.isLoading = true; | ||||
|   ReceiveApi.getOrderPage({ ...params, ...filterNullUndefined(state.params) }).then((res) => { | ||||
|   ReceiveApi.getOrderPage({ | ||||
|     ...params, | ||||
|     ...filterNullUndefined(state.params), | ||||
|   }).then((res) => { | ||||
|     if (res.code === 200) { | ||||
|       pageList.isLoading = false; | ||||
|       (pageList as any).list = (pageList as any).list = pageList.list.concat( | ||||
|  | @ -420,7 +431,6 @@ onMounted(() => { | |||
|     font-size: 26rpx; | ||||
|     color: #000000; | ||||
|     margin: 30rpx 0rpx 0rpx 30rpx; | ||||
|      | ||||
|   } | ||||
|   .box + .box { | ||||
|     margin-top: 30rpx; | ||||
|  |  | |||
|  | @ -32,17 +32,36 @@ | |||
|           </view> | ||||
|           <view class="op-box"> | ||||
|             <view class="btn" @click="edit(item)"> 编辑 </view> | ||||
|             <view class="btn" @click="update(item)"> 删除 </view> | ||||
|             <view class="btn" @click="handleModal(true, item.id)"> 删除 </view> | ||||
|           </view> | ||||
|         </view> | ||||
|       </view> | ||||
|     </page-view> | ||||
|   </view> | ||||
|   <SmallModal | ||||
|     :title="'确认删除吗?'" | ||||
|     :content="'确认删除后,不能恢复!'" | ||||
|     :okText="'确认删除'" | ||||
|     :isMain="true" | ||||
|     :show="isShowCancelModal" | ||||
|     @handleModal="(v:boolean) => {handleModal(v, deleteId)}" | ||||
|     @handleOk="handleOk()" | ||||
|   /> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { GoodsApi } from "@/services"; | ||||
| import { UsersType } from "@/utils/enum"; | ||||
| import PageView from "@/components/PageView/index.vue"; | ||||
| import SmallModal from "@/components/Modal/smallModal.vue"; | ||||
| const isShowCancelModal = ref(false); | ||||
| const deleteId = ref(0); | ||||
| const handleModal = (v: boolean, id: number) => { | ||||
|   isShowCancelModal.value = v; | ||||
|   deleteId.value = id; | ||||
| }; | ||||
| const handleOk = () => { | ||||
|   update({id: deleteId.value}) | ||||
| }; | ||||
| const state = reactive<any>({ | ||||
|   name: "", | ||||
|   supplierTypeId: -1, | ||||
|  | @ -53,6 +72,7 @@ const pageList: PageResult<{ | |||
|   reProductsName: string; | ||||
|   minPrice: number; | ||||
|   maxPrice: number; | ||||
|   id: number | ||||
| }> = reactive({ | ||||
|   isLoading: false, | ||||
|   noMoreData: false, | ||||
|  |  | |||
|  | @ -31,7 +31,9 @@ | |||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.disabled" | ||||
|           :disabled="item.disabled || item.type === 'select'" | ||||
|           :disabledColor="['补单时间','站点磅秤','供应商','收货产品'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|           @change="(e:any) => {handleInput(e, item)}" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text v-if="item.key === 'subtractNum'"> | ||||
|  | @ -92,6 +94,23 @@ | |||
|   <view class="btn-box"> | ||||
|     <u-button type="primary" text="保存" @click="save()"></u-button> | ||||
|   </view> | ||||
| 
 | ||||
|   <!-- 供应商选择弹框 --> | ||||
|   <SupplierDialog | ||||
|     ref="supplierDialog" | ||||
|     :show="showDialog.showSupplier" | ||||
|     @handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}" | ||||
|     @changeUser="changeUser" | ||||
|     :isShipment="false" | ||||
|   ></SupplierDialog> | ||||
|   <!-- 收货产品弹框 --> | ||||
|   <ProductDialog | ||||
|     :show="showDialog.showProduct" | ||||
|     @handleDialog="(v:boolean) => {handleDialog('showProduct', v)}" | ||||
|     @changeProduct="changeProduct" | ||||
|     ref="productRef" | ||||
|     :isShipment="false" | ||||
|   ></ProductDialog> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { | ||||
|  | @ -102,16 +121,105 @@ import { | |||
|   ReceiveProductApi, | ||||
|   SupplierApi, | ||||
| } from "@/services"; | ||||
| import { formatDate } from "@/utils"; | ||||
| import { countDots, formatDate } from "@/utils"; | ||||
| import { DeviceType, ImagesType, OrderType } from "@/utils/enum"; | ||||
| import _ from "underscore"; | ||||
| import SupplierDialog from "./components/SupplierDialog.vue"; | ||||
| import ProductDialog from "./components/ProductDialog.vue"; | ||||
| import valid from "@/utils/validate"; | ||||
| // 供应商选择 | ||||
| const showDialog = < | ||||
|   { | ||||
|     [key: string]: boolean; | ||||
|   } | ||||
| >reactive({ | ||||
|   showSupplier: false, | ||||
|   showProduct: false, | ||||
| }); | ||||
| 
 | ||||
| const handleDialog = (key: string, v: boolean) => { | ||||
|   showDialog[key] = v; | ||||
| }; | ||||
| 
 | ||||
| const changeUser = (obj: any) => { | ||||
|   model1.order.userName = obj.name; // 供应商名称 | ||||
|   model1.order.userId = obj.id; // 供应商Id, | ||||
| }; | ||||
| 
 | ||||
| // 收货产品选择 | ||||
| const changeProduct = (obj: any) => { | ||||
|   model1.order.productName = obj.reProductsName; // 收货产品名称 | ||||
|   model1.order.productId = obj.id; // 收货产品Id, | ||||
|   model1.order.price = obj.commonPrice; // 设置常用价格 | ||||
|   model1.order.minPrice = obj.minPrice; // 保存最大最小值 | ||||
|   model1.order.maxPrice = obj.maxPrice; | ||||
| }; | ||||
| 
 | ||||
| // 毛重 皮重 杂质扣除校验 净重 单价 预估总价 货款金额 | ||||
| const handleInput = (e: any, item: any) => { | ||||
|   if ( | ||||
|     ["grossWeight", "tare", "price", "balanceTotalPrice"].indexOf(item.key) > -1 | ||||
|   ) { | ||||
|     const temp = e?.replace(valid.valid_decimal.pattern, ""); | ||||
|     if (countDots(temp).length > 1) { | ||||
|       uni.showToast({ | ||||
|         title: "请输入正确的" + item.name, | ||||
|         icon: "none", | ||||
|       }); | ||||
|     } | ||||
|     if (item.key === "price") { | ||||
|       if (model1.order.minPrice && model1.order.maxPrice) { | ||||
|         if (temp < model1.order.minPrice || temp > model1.order.maxPrice) { | ||||
|           uni.showToast({ | ||||
|             title: `${item.name}应在${model1.order.minPrice}-${model1.order.maxPrice}之间`, | ||||
|             icon: "none", | ||||
|           }); | ||||
|           return; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     if (item.key === "tare") { | ||||
|       if ( | ||||
|         parseFloat(model1.order.tare) > parseFloat(model1.order.grossWeight) | ||||
|       ) { | ||||
|         uni.showToast({ | ||||
|           title: `毛重需大于皮重`, | ||||
|           icon: "none", | ||||
|         }); | ||||
|         return; | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     setTimeout(() => { | ||||
|       model1.order[item.key] = temp; | ||||
|     }, 100); | ||||
|   } | ||||
|   if (item.key === "subtractNum") { | ||||
|     const temp = e?.replace(valid.valid_decimal.pattern, ""); | ||||
|     if ( | ||||
|       model1.order.buttonType === 1 && | ||||
|       (parseInt(temp) > 100 || parseInt(temp) < 0) | ||||
|     ) { | ||||
|       uni.showToast({ | ||||
|         title: `${item.name}正确范围是0-100`, | ||||
|         icon: "none", | ||||
|       }); | ||||
|     } | ||||
|     setTimeout(() => { | ||||
|       model1.order[item.key] = temp; | ||||
|     }, 100); | ||||
|   } | ||||
| }; | ||||
| 
 | ||||
| const model1 = reactive<any>({ | ||||
|   order: { | ||||
|     buttonType: 0, | ||||
|     fileLists: [], | ||||
|     splTime:'', | ||||
|     splTime: "", | ||||
|     subtractType: 1, | ||||
|     netWeight: 0, | ||||
|     totalPrice: 0 | ||||
|   }, | ||||
| }); | ||||
| const rules = reactive({ | ||||
|  | @ -140,33 +248,33 @@ const rules = reactive({ | |||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "order.grossWeight": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入毛重", | ||||
|     message: "毛重为空或输入错误", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "order.tare": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入皮重", | ||||
|     message: "皮重为空或输入错误", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "order.price": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入单价", | ||||
|     message: "单价为空或输入错误", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "order.balanceTotalPrice": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入货款金额", | ||||
|     message: "货款金额为空或输入错误", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
| }); | ||||
| const contrlModalParams = reactive<any>({ | ||||
|   isShowSplTime: false, | ||||
|   spltime:  Number(new Date()), | ||||
|   spltime: Number(new Date()), | ||||
|   device: { | ||||
|     isShow: false, | ||||
|     title: "标题", | ||||
|  | @ -215,8 +323,10 @@ const formAttrList = reactive<any>([ | |||
|     required: true, | ||||
|     unit: "", | ||||
|     fn: () => { | ||||
|       contrlModalParams.user.isShow = true; | ||||
|       contrlModalParams.user.title = "供应商"; | ||||
|       // contrlModalParams.user.isShow = true; | ||||
|       // contrlModalParams.user.title = "供应商"; | ||||
|       handleDialog("showSupplier", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|  | @ -233,8 +343,10 @@ const formAttrList = reactive<any>([ | |||
|     required: true, | ||||
|     unit: "", | ||||
|     fn: () => { | ||||
|       contrlModalParams.product.isShow = true; | ||||
|       contrlModalParams.product.title = "收货产品"; | ||||
|       // contrlModalParams.product.isShow = true; | ||||
|       // contrlModalParams.product.title = "收货产品"; | ||||
|       handleDialog("showProduct", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|  | @ -267,7 +379,7 @@ const formAttrList = reactive<any>([ | |||
|     key: "netWeight", | ||||
|     type: "input", | ||||
|     unit: "KG", | ||||
|     disabled: true | ||||
|     disabled: true, | ||||
|   }, | ||||
|   { | ||||
|     name: "单价", | ||||
|  | @ -281,7 +393,7 @@ const formAttrList = reactive<any>([ | |||
|     key: "totalPrice", | ||||
|     type: "input", | ||||
|     unit: "元", | ||||
|     disabled: true | ||||
|     disabled: true, | ||||
|   }, | ||||
|   { | ||||
|     name: "货款金额", | ||||
|  | @ -317,7 +429,7 @@ watch( | |||
|       预估总价: 结算单价*结算重量 | ||||
|       实际收入:实际结算金额-运费-杂费 | ||||
|      */ | ||||
|     model1.order.netWeight = (grossWeightNew || 0) - (tareNew || 0); | ||||
|     model1.order.netWeight = ((parseFloat(grossWeightNew) || 0) - (parseFloat(tareNew) || 0)).toFixed(2); | ||||
|     if (model1.order.buttonType === 0) { | ||||
|       if (model1.order.subtractNum) { | ||||
|         model1.order.netWeight = | ||||
|  | @ -331,6 +443,8 @@ watch( | |||
|     } | ||||
|     model1.order.totalPrice = | ||||
|       (model1.order.price || 0) * (model1.order.netWeight || 0); | ||||
|       // 货款金额默认=预估总价,当系统自动算出预估总价时,值需同步 | ||||
|     model1.order.balanceTotalPrice = model1.order.totalPrice; | ||||
|   } | ||||
| ); | ||||
| 
 | ||||
|  | @ -448,6 +562,19 @@ const check = () => { | |||
|   }); | ||||
| }; | ||||
| const save = () => { | ||||
|   if (model1.order.carNumber) { | ||||
|     if (!valid.carNo.pattern.test(model1.order.carNumber)) { | ||||
|       uni.showToast({ icon: "none", title: "请输入正确的车牌号" }); | ||||
|       return; | ||||
|     } | ||||
|   } | ||||
|   if (parseFloat(model1.order.tare) > parseFloat(model1.order.grossWeight)) { | ||||
|     uni.showToast({ | ||||
|       title: `毛重需大于皮重`, | ||||
|       icon: "none", | ||||
|     }); | ||||
|     return; | ||||
|   } | ||||
|   check().then((res) => { | ||||
|     if (res) { | ||||
|       startSave(); | ||||
|  |  | |||
|  | @ -30,22 +30,41 @@ | |||
|           </view> | ||||
|           <view class="op-box"> | ||||
|             <view class="btn" @click="edit(item)"> 编辑 </view> | ||||
|             <view class="btn" @click="deleteType(item)"> 删除 </view> | ||||
|             <view class="btn" @click="handleModal(true, item.id)" > 删除 </view> | ||||
|           </view> | ||||
|         </view> | ||||
|       </view> | ||||
|     </page-view> | ||||
|   </view> | ||||
| 
 | ||||
|   <SmallModal | ||||
|     :title="'确认删除吗?'" | ||||
|     :content="'确认删除后,不能恢复!'" | ||||
|     :okText="'确认删除'" | ||||
|     :isMain="true" | ||||
|     :show="isShowCancelModal" | ||||
|     @handleModal="(v:boolean) => {handleModal(v, deleteId)}" | ||||
|     @handleOk="handleOk()" | ||||
|   /> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { GoodsApi } from "@/services"; | ||||
| import { StockCardType } from "@/utils/enum"; | ||||
| import PageView from "@/components/PageView/index.vue"; | ||||
| import SmallModal from "@/components/Modal/smallModal.vue"; | ||||
| const isShowCancelModal = ref(false); | ||||
| const deleteId = ref(0); | ||||
| const handleModal = (v: boolean, id: number) => { | ||||
|   isShowCancelModal.value = v; | ||||
|   deleteId.value = id; | ||||
| }; | ||||
| const handleOk = () => { | ||||
|   deleteType({id: deleteId.value}) | ||||
| }; | ||||
| 
 | ||||
| const state = reactive<any>({ | ||||
|   name: "", | ||||
| }); | ||||
| const pageList: PageResult<{ reCategoryName: string }> = reactive({ | ||||
| const pageList: PageResult<{ reCategoryName: string, id: number }> = reactive({ | ||||
|   isLoading: false, | ||||
|   noMoreData: false, | ||||
|   total: 0, | ||||
|  |  | |||
|  | @ -178,10 +178,14 @@ const state = reactive({ | |||
|   startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}"), | ||||
|   endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}"), | ||||
|   name: "本月", | ||||
|   currentScaleStatus: undefined, | ||||
|   currentScaleStatus: -1, | ||||
|   currentSortName: undefined, | ||||
|   isShowStatus: false, | ||||
|   statusList: [ | ||||
|   { | ||||
|       name: "全部", | ||||
|       key: -1, | ||||
|     }, | ||||
|     { | ||||
|       name: "待出货", | ||||
|       key: 0, | ||||
|  | @ -382,7 +386,7 @@ const getList = (v?: boolean) => { | |||
|     startTime: state.startTime + " 00:00:00", | ||||
|     endTime: state.endTime + " 23:59:59", | ||||
|   }; | ||||
|   if (state.currentScaleStatus !== undefined) { | ||||
|   if (state.currentScaleStatus > -1) { | ||||
|     params.scaleStatus = state.currentScaleStatus; | ||||
|   } | ||||
|   if (state.currentSortName !== undefined) { | ||||
|  |  | |||
|  | @ -34,17 +34,36 @@ | |||
|           </view> | ||||
|           <view class="op-box"> | ||||
|             <view class="btn" @click="edit(item)"> 编辑 </view> | ||||
|             <view class="btn" @click="update(item)"> 删除 </view> | ||||
|             <view class="btn" @click="handleModal(true, item.id)"> 删除 </view> | ||||
|           </view> | ||||
|         </view> | ||||
|       </view> | ||||
|     </page-view> | ||||
|   </view> | ||||
|   <SmallModal | ||||
|     :title="'确认删除吗?'" | ||||
|     :content="'确认删除后,不能恢复!'" | ||||
|     :okText="'确认删除'" | ||||
|     :isMain="true" | ||||
|     :show="isShowCancelModal" | ||||
|     @handleModal="(v:boolean) => {handleModal(v, deleteId)}" | ||||
|     @handleOk="handleOk()" | ||||
|   /> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { GoodsApi } from "@/services"; | ||||
| import { UsersType } from "@/utils/enum"; | ||||
| 
 | ||||
| import PageView from "@/components/PageView/index.vue"; | ||||
| import SmallModal from "@/components/Modal/smallModal.vue"; | ||||
| const isShowCancelModal = ref(false); | ||||
| const deleteId = ref(0); | ||||
| const handleModal = (v: boolean, id: number) => { | ||||
|   isShowCancelModal.value = v; | ||||
|   deleteId.value = id; | ||||
| }; | ||||
| const handleOk = () => { | ||||
|   update({id: deleteId.value}) | ||||
| }; | ||||
| const state = reactive<any>({ | ||||
|   name: "", | ||||
|   supplierTypeId: -1, | ||||
|  | @ -55,6 +74,7 @@ const pageList: PageResult<{ | |||
|   shmProductsName: string; | ||||
|   parentName: string; | ||||
|   shmCategoryName: string; | ||||
|   id: number | ||||
| }> = reactive({ | ||||
|   isLoading: false, | ||||
|   noMoreData: false, | ||||
|  | @ -103,7 +123,7 @@ const getList = (v?: boolean) => { | |||
|   let params: any = { | ||||
|     pageSize: pageList.pageSize, | ||||
|     pageNum: pageList.pageNum, | ||||
|     name: state.name, | ||||
|     shmProductsName: state.name, | ||||
|   }; | ||||
|   GoodsApi.getShipmentProductByPage(params).then((res: any) => { | ||||
|     if (res.code === 200) { | ||||
|  |  | |||
|  | @ -31,7 +31,9 @@ | |||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.disabled" | ||||
|           :disabled="item.disabled || item.type === 'select'" | ||||
|           :disabledColor="['补单时间','过磅设备','客户','出货产品'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'" | ||||
|           @change="(e:any) => {handleInput(e, item)}" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             <text v-if="item.key === 'subtractNum'"> | ||||
|  | @ -92,6 +94,23 @@ | |||
|   <view class="btn-box"> | ||||
|     <u-button type="primary" text="保存" @click="save()"></u-button> | ||||
|   </view> | ||||
| 
 | ||||
|   <!-- 客户选择弹框 --> | ||||
|   <SupplierDialog | ||||
|     ref="supplierDialog" | ||||
|     :show="showDialog.showSupplier" | ||||
|     @handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}" | ||||
|     @changeUser="changeUser" | ||||
|     :isShipment="true" | ||||
|   ></SupplierDialog> | ||||
|   <!-- 出货产品弹框 --> | ||||
|   <ProductDialog | ||||
|     :show="showDialog.showProduct" | ||||
|     @handleDialog="(v:boolean) => {handleDialog('showProduct', v)}" | ||||
|     @changeProduct="changeProduct" | ||||
|     ref="productRef" | ||||
|     :isShipment="true" | ||||
|   ></ProductDialog> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { | ||||
|  | @ -99,14 +118,69 @@ import { | |||
|   DeviceApi, | ||||
|   GoodsApi, | ||||
|   PictureApi, | ||||
|   ProfileApi, | ||||
|   ReceiveApi, | ||||
|   ReceiveProductApi, | ||||
|   ShipmentApi, | ||||
| } from "@/services"; | ||||
| import { formatDate } from "@/utils"; | ||||
| import { countDots, formatDate } from "@/utils"; | ||||
| import { DeviceType, ImagesType, OrderType } from "@/utils/enum"; | ||||
| import _ from "underscore"; | ||||
| import SupplierDialog from "./components/SupplierDialog.vue"; | ||||
| import ProductDialog from "./components/ProductDialog.vue"; | ||||
| import valid from "@/utils/validate"; | ||||
| // 供应商选择 | ||||
| const showDialog = < | ||||
|   { | ||||
|     [key: string]: boolean; | ||||
|   } | ||||
| >reactive({ | ||||
|   showSupplier: false, | ||||
|   showProduct: false, | ||||
| }); | ||||
| 
 | ||||
| const handleDialog = (key: string, v: boolean) => { | ||||
|   showDialog[key] = v; | ||||
| }; | ||||
| 
 | ||||
| const changeUser = (obj: any) => { | ||||
|   model1.order.userName = obj.name; // 供应商名称 | ||||
|   model1.order.userId = obj.id; // 供应商Id, | ||||
| }; | ||||
| 
 | ||||
| // 收货产品选择 | ||||
| const changeProduct = (obj: any) => { | ||||
|   model1.order.productName = obj.shmProductsName; // 收货产品名称 | ||||
|   model1.order.productId = obj.id; // 收货产品Id, | ||||
| }; | ||||
| 
 | ||||
| // 单价 毛重 杂质扣除校验 | ||||
| const handleInput = (e: any, item: any) => { | ||||
|   if (item.key === "grossWeight" || item.key === "tare") { | ||||
|     const temp = e?.replace(valid.valid_decimal.pattern, ""); | ||||
|     if (countDots(temp).length > 1) { | ||||
|       uni.showToast({ | ||||
|         title: "请输入正确的" + item.name, | ||||
|         icon: "none", | ||||
|       }); | ||||
|       return; | ||||
|     } | ||||
|     setTimeout(() => { | ||||
|       model1.order[item.key] = temp; | ||||
|     }, 100); | ||||
|   } | ||||
| 
 | ||||
|   if (item.key === "number" ) { | ||||
|     const temp = e?.replace(valid.valid_number, ""); | ||||
|     if (countDots(temp).length > 1) { | ||||
|       uni.showToast({ | ||||
|         title: "请输入正确的" + item.name, | ||||
|         icon: "none", | ||||
|       }); | ||||
|       return; | ||||
|     } | ||||
|     setTimeout(() => { | ||||
|       model1.order[item.key] = temp; | ||||
|     }, 100); | ||||
|   } | ||||
| }; | ||||
| 
 | ||||
| const model1 = reactive<any>({ | ||||
|   order: { | ||||
|  | @ -114,6 +188,7 @@ const model1 = reactive<any>({ | |||
|     fileLists: [], | ||||
|     splTime: "", | ||||
|     subtractType: 1, | ||||
|     netWeight: 0 | ||||
|   }, | ||||
| }); | ||||
| const rules = reactive({ | ||||
|  | @ -142,19 +217,19 @@ const rules = reactive({ | |||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "order.number": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入数量", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "order.grossWeight": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入毛重", | ||||
|     trigger: ["blur", "change"], | ||||
|   }, | ||||
|   "order.tare": { | ||||
|     type: "string", | ||||
|     type: "number", | ||||
|     required: true, | ||||
|     message: "请输入皮重", | ||||
|     trigger: ["blur", "change"], | ||||
|  | @ -162,7 +237,7 @@ const rules = reactive({ | |||
| }); | ||||
| const contrlModalParams = reactive<any>({ | ||||
|   isShowSplTime: false, | ||||
|   spltime:  Number(new Date()), | ||||
|   spltime: Number(new Date()), | ||||
|   device: { | ||||
|     isShow: false, | ||||
|     title: "标题", | ||||
|  | @ -211,8 +286,10 @@ const formAttrList = reactive<any>([ | |||
|     required: true, | ||||
|     unit: "", | ||||
|     fn: () => { | ||||
|       contrlModalParams.user.isShow = true; | ||||
|       contrlModalParams.user.title = "客户"; | ||||
|       // contrlModalParams.user.isShow = true; | ||||
|       // contrlModalParams.user.title = "客户"; | ||||
|       handleDialog("showSupplier", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|  | @ -223,8 +300,10 @@ const formAttrList = reactive<any>([ | |||
|     required: true, | ||||
|     unit: "", | ||||
|     fn: () => { | ||||
|       contrlModalParams.product.isShow = true; | ||||
|       contrlModalParams.product.title = "收货产品"; | ||||
|       // contrlModalParams.product.isShow = true; | ||||
|       // contrlModalParams.product.title = "收货产品"; | ||||
|       handleDialog("showProduct", true); | ||||
|       uni.hideKeyboard(); | ||||
|     }, | ||||
|   }, | ||||
|   { | ||||
|  | @ -318,10 +397,7 @@ const formAttrList = reactive<any>([ | |||
| 
 | ||||
| // 监听毛重 皮重 | ||||
| watch( | ||||
|   [ | ||||
|     () => model1.order.grossWeight, | ||||
|     () => model1.order.tare, | ||||
|   ], | ||||
|   [() => model1.order.grossWeight, () => model1.order.tare], | ||||
|   ([grossWeightNew, tareNew]) => { | ||||
|     /** | ||||
|      * 过磅净重: 毛重-皮重 | ||||
|  | @ -374,7 +450,6 @@ const handleDelete = (e: any) => { | |||
| const handleSelect = (key: string, v: any) => { | ||||
|   contrlModalParams[key].isShow = false; | ||||
|   if (key === "user") { | ||||
|     debugger; | ||||
|     model1.order.userName = v.name; | ||||
|     model1.order.userId = v.id; | ||||
|   } else if (key === "product") { | ||||
|  | @ -429,7 +504,7 @@ const upload = () => { | |||
| /** | ||||
|  * 校验 | ||||
|  */ | ||||
|  const form = ref(); | ||||
| const form = ref(); | ||||
| const check = () => { | ||||
|   return new Promise((resolve) => { | ||||
|     form.value | ||||
|  | @ -438,7 +513,6 @@ const check = () => { | |||
|         resolve(res); | ||||
|       }) | ||||
|       .catch((errors: any) => { | ||||
|         debugger | ||||
|         resolve(false); | ||||
|         uni.showToast({ | ||||
|           icon: "none", | ||||
|  | @ -449,6 +523,18 @@ const check = () => { | |||
| }; | ||||
| 
 | ||||
| const save = () => { | ||||
|   if (model1.order.carNumber) { | ||||
|     if (!valid.carNo.pattern.test(model1.order.carNumber)) { | ||||
|       uni.showToast({ icon: "none", title: "请输入正确的车牌号" }); | ||||
|       return; | ||||
|     } | ||||
|   } | ||||
|   if (model1.order.phone) { | ||||
|     if (!valid.mobile.pattern.test(model1.order.phone)) { | ||||
|       uni.showToast({ icon: "none", title: "请输入正确的手机号" }); | ||||
|       return; | ||||
|     } | ||||
|   } | ||||
|   check().then((res) => { | ||||
|     if (res) { | ||||
|       startSave(); | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| <template> | ||||
|   <view class="c-card"> | ||||
|     <view class="search"> | ||||
|       <u-search | ||||
|       <!-- <u-search | ||||
|         placeholder="请输入出货分类" | ||||
|         v-model="state.name" | ||||
|         :showAction="false" | ||||
|  | @ -9,44 +9,86 @@ | |||
|         :borderColor="'rgba(0, 0, 0, 0.1)'" | ||||
|         :placeholderColor="'#C1C1C1'" | ||||
|         @search="handleSearch()" | ||||
|       ></u-search> | ||||
|       ></u-search> --> | ||||
|         | ||||
|       <view class="btn" @click="add"> 新增 </view> | ||||
|     </view> | ||||
|     <page-view | ||||
|       @loadList=" | ||||
|         (v) => { | ||||
|           getList(v); | ||||
|         } | ||||
|       " | ||||
|       :noMoreData="pageList.noMoreData" | ||||
|       :list="pageList.list" | ||||
|       :height="100" | ||||
|       :isLoading="pageList.isLoading" | ||||
|     > | ||||
|       <view class="box"> | ||||
|         <view v-for="(item, index) in pageList.list" :key="index"> | ||||
|     <view class="collapse-box box"> | ||||
|       <view v-for="(item, index) in pageList.list" :key="index"> | ||||
|         <view class="item"> | ||||
|           <view> | ||||
|             <view>{{ item.reCategoryName }}</view> | ||||
|             <view>{{ item.shmCategoryName }}</view> | ||||
|           </view> | ||||
|           <view class="op-box"> | ||||
|             <view class="btn" @click="edit(item)"> 编辑 </view> | ||||
|             <view class="btn" @click="deleteType(item)"> 删除 </view> | ||||
|             <view style="display: flex" @click="edit(item)"> | ||||
|               <up-icon name="edit-pen" color="#909399"></up-icon> | ||||
|             </view> | ||||
|             <view | ||||
|               class="ml-20" | ||||
|               style="display: flex" | ||||
|               @click="handleModal(true, item.id)" | ||||
|               v-if="!item.childrenList" | ||||
|             > | ||||
|               <up-icon name="trash" color="#909399"></up-icon> | ||||
|             </view> | ||||
|             <view class="ml-20" style="display: flex" | ||||
|               ><up-icon | ||||
|                 :name="item.show ? 'arrow-up' : 'arrow-down'" | ||||
|                 color="#909399" | ||||
|                 @click="item.show = !item.show" | ||||
|               ></up-icon | ||||
|             ></view> | ||||
|           </view> | ||||
|         </view> | ||||
| 
 | ||||
|         <view class="box" v-if="item.show"> | ||||
|           <view | ||||
|             v-for="(cItem, index) in item.childrenList" | ||||
|             :key="index" | ||||
|             class="item" | ||||
|           > | ||||
|             <view> | ||||
|               <view>{{ cItem.shmCategoryName }}</view> | ||||
|             </view> | ||||
|             <view class="op-box"> | ||||
|               <view class="btn" @click="edit(cItem)"> 编辑 </view> | ||||
|               <view class="btn" @click="handleModal(true, cItem.id)"> 删除 </view> | ||||
|             </view> | ||||
|           </view> | ||||
|           <view class="no-data" v-if="!item.childrenList">暂无数据</view> | ||||
|         </view> | ||||
|       </view> | ||||
|     </page-view> | ||||
|     </view> | ||||
|   </view> | ||||
|   <SmallModal | ||||
|     :title="'确认删除吗?'" | ||||
|     :content="'确认删除后,不能恢复!'" | ||||
|     :okText="'确认删除'" | ||||
|     :isMain="true" | ||||
|     :show="isShowCancelModal" | ||||
|     @handleModal="(v:boolean) => {handleModal(v, deleteId)}" | ||||
|     @handleOk="handleOk()" | ||||
|   /> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
| import { GoodsApi } from "@/services"; | ||||
| import PageView from "@/components/PageView/index.vue"; | ||||
| import SmallModal from "@/components/Modal/smallModal.vue"; | ||||
| const isShowCancelModal = ref(false); | ||||
| const deleteId = ref(0); | ||||
| const handleModal = (v: boolean, id: number) => { | ||||
|   isShowCancelModal.value = v; | ||||
|   deleteId.value = id; | ||||
| }; | ||||
| const handleOk = () => { | ||||
|   deleteType({id: deleteId.value}) | ||||
| }; | ||||
| 
 | ||||
| const keyword = ref(""); | ||||
| 
 | ||||
| const state = reactive<any>({ | ||||
|   name: "", | ||||
| }); | ||||
| const pageList: PageResult<{ reCategoryName: string }> = reactive({ | ||||
| const pageList: PageResult<{ | ||||
|   shmCategoryName: string; | ||||
|   id: number; | ||||
|   childrenList: any; | ||||
|   show?: boolean; | ||||
| }> = reactive({ | ||||
|   isLoading: false, | ||||
|   noMoreData: false, | ||||
|   total: 0, | ||||
|  | @ -74,43 +116,17 @@ const edit = (item: any) => { | |||
|   }); | ||||
| }; | ||||
| const deleteType = (item: any) => { | ||||
|   GoodsApi.editReceiveCategory({ isDeleted: true, id: item.id }).then((res) => { | ||||
|   GoodsApi.deleteById({ id: item.id }).then((res) => { | ||||
|     if (res.code === 200) { | ||||
|       getList(); | ||||
|     } | ||||
|   }); | ||||
| }; | ||||
| const handleSearch = () => { | ||||
|   resetPageList() | ||||
|   getList(); | ||||
| }; | ||||
| 
 | ||||
| const getList = (v?: boolean) => { | ||||
|   if (v) { | ||||
|     if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) { | ||||
|       pageList.pageNum++; | ||||
|       if (Math.ceil(pageList.total / pageList.pageSize) <= pageList.pageNum) { | ||||
|         pageList.noMoreData = true; | ||||
|       } | ||||
|     } else { | ||||
|       pageList.noMoreData = true; | ||||
|       return; | ||||
|     } | ||||
|   } | ||||
|   let params: any = { | ||||
|     pageSize: pageList.pageSize, | ||||
|     pageNum: pageList.pageNum, | ||||
|     reCategoryName: state.name, | ||||
|   }; | ||||
|   if (state.supplierTypeId > -1) { | ||||
|     params.supplierTypeId = state.supplierTypeId; | ||||
|   } | ||||
|   GoodsApi.getPage(params).then((res) => { | ||||
|   GoodsApi.getShipmentCategory().then((res) => { | ||||
|     if (res.code === 200) { | ||||
|       (pageList as any).list = (pageList as any).list.concat( | ||||
|         (res.data as any).list | ||||
|       ); | ||||
|       pageList.total = (res.data as any).total; | ||||
|       (pageList as any).list = res.data; | ||||
|     } | ||||
|   }); | ||||
| }; | ||||
|  | @ -137,6 +153,9 @@ onMounted(() => { | |||
|       padding: 6rpx 30rpx; | ||||
|     } | ||||
|   } | ||||
|   .collapse-box { | ||||
|     margin-top: 30rpx; | ||||
|   } | ||||
|   .box { | ||||
|     background: #ffffff; | ||||
|     box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12); | ||||
|  | @ -146,8 +165,7 @@ onMounted(() => { | |||
|     font-size: 26rpx; | ||||
|     color: #000000; | ||||
|     line-height: 41rpx; | ||||
|     margin-top: 30rpx; | ||||
|     > view { | ||||
|     .item { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|       justify-content: space-between; | ||||
|  | @ -170,6 +188,12 @@ onMounted(() => { | |||
|     > view + view { | ||||
|       border-top: 1px solid rgba(233, 233, 233, 0.76); | ||||
|     } | ||||
|     .no-data { | ||||
|       color: #606266; | ||||
|       font-size: 12px; | ||||
|       text-align: center; | ||||
|       padding: 20rpx; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|  |  | |||
|  | @ -35,8 +35,13 @@ | |||
|           border="none" | ||||
|           :value="(model1.order as any)[item.key]" | ||||
|           @change="(e:any) => {handleInput(e, item)}" | ||||
|           :disabled="item.disabled || item.type === 'select'" | ||||
|           :disabledColor="item.name === '收货产品'?'#ffffff':'#f5f7fa'" | ||||
| 
 | ||||
|         > | ||||
|         | ||||
|           <template #suffix> | ||||
|    | ||||
|             <text v-if="item.key === 'subtractNum'"> | ||||
|               {{ model1.order.buttonType === 0 ? item.unit : "%" }} | ||||
|             </text> | ||||
|  | @ -45,18 +50,6 @@ | |||
|             </text> | ||||
|           </template> | ||||
|         </up-input> | ||||
|         <!-- 自定义selectui --> | ||||
|         <u-input | ||||
|           v-if="item.type === 'selectCustom'" | ||||
|           v-model="(model1.order as any)[item.key]" | ||||
|           :placeholder="`请选择${item.name}`" | ||||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           disabled | ||||
|           disabledColor="#ffffff" | ||||
|         > | ||||
|         </u-input> | ||||
|         <!-- @afterRead="afterRead" | ||||
|           @delete="deletePic" --> | ||||
|         <uni-file-picker | ||||
|  | @ -85,7 +78,7 @@ | |||
|         </u-radio-group> | ||||
|         <template | ||||
|           #right | ||||
|           v-if="item.type === 'select' || item.type === 'selectCustom'" | ||||
|           v-if="item.type === 'select'" | ||||
|         > | ||||
|           <u-icon name="arrow-right"></u-icon> | ||||
|         </template> | ||||
|  | @ -165,19 +158,34 @@ const changeUser = (obj: any) => { | |||
| const changeProduct = (obj: any) => { | ||||
|   model1.order.productName = obj.reProductsName; // 收货产品名称 | ||||
|   model1.order.productId = obj.id; // 收货产品Id, | ||||
|   model1.order.price = obj.commonPrice; // 设置常用价格 | ||||
|   model1.order.minPrice = obj.minPrice; // 保存最大最小值 | ||||
|   model1.order.maxPrice = obj.maxPrice; | ||||
| }; | ||||
| // 单价 毛重 杂质扣除校验 | ||||
| const handleInput = (e: any, item: any) => { | ||||
|   if (item.key === "price" || item.key === "grossWeight") { | ||||
|     const tempPrice = e?.replace(valid.valid_decimal.pattern, ""); | ||||
|     if (countDots(tempPrice).length > 1) { | ||||
|     const temp = e?.replace(valid.valid_decimal.pattern, ""); | ||||
|     if (countDots(temp).length > 1) { | ||||
|       uni.showToast({ | ||||
|         title: "请输入正确的" + item.name, | ||||
|         icon: "none", | ||||
|       }); | ||||
|     } | ||||
|     if (item.key === "price") { | ||||
|       if (model1.order.minPrice && model1.order.maxPrice) { | ||||
|         if (temp < model1.order.minPrice || temp > model1.order.maxPrice) { | ||||
|           uni.showToast({ | ||||
|             title: `${item.name}应在${model1.order.minPrice}-${model1.order.maxPrice}之间`, | ||||
|             icon: "none", | ||||
|           }); | ||||
|           return; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     setTimeout(() => { | ||||
|       model1.order[item.key] = tempPrice; | ||||
|       model1.order[item.key] = temp; | ||||
|     }, 100); | ||||
|   } | ||||
|   if (item.key === "subtractNum") { | ||||
|  | @ -273,7 +281,7 @@ const formAttrList = reactive<ComType>([ | |||
|   { | ||||
|     name: "供应商", | ||||
|     key: "userName", | ||||
|     type: "selectCustom", | ||||
|     type: "select", | ||||
|     unit: "", | ||||
|     childKey: "userSelect", | ||||
|     required: true, | ||||
|  | @ -291,7 +299,7 @@ const formAttrList = reactive<ComType>([ | |||
|   { | ||||
|     name: "收货产品", | ||||
|     key: "productName", | ||||
|     type: "selectCustom", | ||||
|     type: "select", | ||||
|     unit: "", | ||||
|     childKey: "productSelect", | ||||
|     required: true, | ||||
|  | @ -315,6 +323,7 @@ const formAttrList = reactive<ComType>([ | |||
|     type: "input", | ||||
|     unit: "KG", | ||||
|     required: true, | ||||
|     disabled: true | ||||
|   }, | ||||
|   { | ||||
|     name: "扣杂", | ||||
|  | @ -494,6 +503,19 @@ const save = () => { | |||
|     }); | ||||
|     return; | ||||
|   } | ||||
| 
 | ||||
|   if (model1.order.minPrice && model1.order.maxPrice) { | ||||
|     if ( | ||||
|       parseInt(model1.order.price + "") < model1.order.minPrice || | ||||
|       parseInt(model1.order.price + "") > model1.order.maxPrice | ||||
|     ) { | ||||
|       uni.showToast({ | ||||
|         title: `单价应在${model1.order.minPrice}-${model1.order.maxPrice}之间`, | ||||
|         icon: "none", | ||||
|       }); | ||||
|       return; | ||||
|     } | ||||
|   } | ||||
|   if ( | ||||
|     model1.order.grossWeight?.toString() && | ||||
|     model1.order.grossWeight?.toString()[ | ||||
|  | @ -534,11 +556,15 @@ const updateOrder = () => { | |||
|    * 有皮重 scaleState = 1 带过皮 | ||||
|      零皮重 scaleState = 2 带审核 | ||||
|    */ | ||||
|   if (model1.order.weighingMethod === 0) { | ||||
|     model1.order.scaleStatus = 1; | ||||
|   } else if (model1.order.weighingMethod === 1) { | ||||
|     model1.order.scaleStatus = 2; | ||||
|   // 若是补单数据 则不做此判断 | ||||
|   if (!model1.order.repairFlag) { | ||||
|     if (model1.order.weighingMethod === 0) { | ||||
|       model1.order.scaleStatus = 1; | ||||
|     } else if (model1.order.weighingMethod === 1) { | ||||
|       model1.order.scaleStatus = 2; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   // | ||||
|   /** | ||||
|    * buttonType | ||||
|  |  | |||
|  | @ -214,7 +214,9 @@ const state = reactive<{ | |||
|   order: Order; | ||||
|   [attrName: string]: any; | ||||
| }>({ | ||||
|   order: {}, | ||||
|   order: { | ||||
|     carNumber: '' | ||||
|   }, | ||||
|   sheetList: [ | ||||
|     { | ||||
|       key: "paySelect", | ||||
|  | @ -281,7 +283,7 @@ const getIsShow = () => { | |||
|   return state.order.scaleStatus === 3 || state.order.scaleStatus === 4; | ||||
| }; | ||||
| const handleScenePhoto = (id: any) => { | ||||
|   uni.redirectTo({ | ||||
|   uni.navigateTo({ | ||||
|     url: "/pagesScenePhoto/index?orderType=1&imagesType=1&id=" + id, // 要跳转到的页面路径 | ||||
|   }); | ||||
| }; | ||||
|  | @ -367,7 +369,7 @@ const handleUpdateOrder = () => { | |||
| }; | ||||
| // 重新过皮 | ||||
| const handleReWeight = () => { | ||||
|   ReceiveApi.reTare({ id: state.order.id }).then((res) => { | ||||
|   ReceiveApi.reTare({ id: state.order.id, userId: state.order.userId, deviceId: state.order.deviceId }).then((res) => { | ||||
|     if (res.code === 200) { | ||||
|       uni.redirectTo({ | ||||
|         url: "/pagesReceive/pricing?scaleStatus=1", // 要跳转到的页面路径 | ||||
|  | @ -385,7 +387,7 @@ onLoad((option) => { | |||
|     ReceiveApi.getDetailById({ id: state.order.id }).then((res) => { | ||||
|       if (res.code === 200) { | ||||
|         state.order = res.data; | ||||
|         gridList1.map((item) => { | ||||
|         gridList1.map((item:any) => { | ||||
|           if (item.name === "扣杂" || item.name === "扣点") { | ||||
|             if (state.order.buttonType === 0) { | ||||
|               item.name = "扣杂"; | ||||
|  | @ -397,7 +399,16 @@ onLoad((option) => { | |||
|               item.unit = "%"; | ||||
|             } | ||||
|           }  | ||||
|           item.num = state.order[item.enName as string]; | ||||
|           if (item.name === "货款金额") { | ||||
|             if (state.order[item.enName as string]) { | ||||
|               item.num = state.order[item.enName as string]; | ||||
|             } else { | ||||
|               item.num = state.order['totalPrice']; | ||||
|             } | ||||
|           } else { | ||||
|             item.num = state.order[item.enName as string]; | ||||
|           } | ||||
|            | ||||
|         }); | ||||
|       } | ||||
|     }); | ||||
|  |  | |||
|  | @ -32,7 +32,7 @@ | |||
|             :clearable="true" | ||||
|             :customStyle="{}" | ||||
|             border="none" | ||||
|             :disabled="item.disabled" | ||||
|             :disabled="item.disabled || item.type === 'select'" | ||||
|             @change="(e:any) => {handleInput(e, item)}" | ||||
|           > | ||||
|             <template #suffix> | ||||
|  | @ -96,6 +96,9 @@ | |||
|             :customStyle="{}" | ||||
|             border="none" | ||||
|             @change="(e:any) => {handleInput(e, item)}" | ||||
|             :disabled="item.disabled || item.type === 'select'" | ||||
|             :disabledColor="item.name === '结算方式'?'#ffffff':'#f5f7fa'" | ||||
|              | ||||
|           > | ||||
|             <template #suffix> | ||||
|               <text v-if="item.key === 'subtractNum'"> | ||||
|  | @ -458,6 +461,10 @@ watch( | |||
|         (model1.order.unitPrice || 0) * (model1.order.settlementWeight || 0) | ||||
|       ).toFixed(2) | ||||
|     ); | ||||
|     if (!model1.order.totalPrice) { | ||||
|       model1.order.totalPrice =  model1.order.estimatePrice; | ||||
|     } | ||||
|      | ||||
|     model1.order.realIncome = | ||||
|       (model1.order.totalPrice || 0) - | ||||
|       (model1.order.freight || 0) - | ||||
|  |  | |||
|  | @ -32,25 +32,14 @@ | |||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           :disabled="item.disabled" | ||||
|           :disabled="item.disabled || item.type === 'select'" | ||||
|           :disabledColor="item.name === '出货产品'?'#ffffff':'#f5f7fa'" | ||||
|           @change="(e:any) => {handleInput(e, item)}" | ||||
|         > | ||||
|           <template #suffix> | ||||
|             {{ item.unit }} | ||||
|           </template> | ||||
|         </u-input> | ||||
|         <!-- 自定义selectui --> | ||||
|         <u-input | ||||
|           v-if="item.type === 'selectCustom'" | ||||
|           v-model="(model1.order as any)[item.key]" | ||||
|           :placeholder="`请选择${item.name}`" | ||||
|           :clearable="true" | ||||
|           :customStyle="{}" | ||||
|           border="none" | ||||
|           disabled | ||||
|           disabledColor="#ffffff" | ||||
|         > | ||||
|         </u-input> | ||||
|         <!-- @afterRead="afterRead" | ||||
|           @delete="deletePic" --> | ||||
|         <!-- <u-upload | ||||
|  | @ -82,7 +71,7 @@ | |||
|               | ||||
|           <u-radio activeColor="#00DCEE" label="自提" :name="1"></u-radio> | ||||
|         </u-radio-group> | ||||
|         <template #right v-if="item.type === 'select' || item.type === 'selectCustom'"> | ||||
|         <template #right v-if="item.type === 'select'"> | ||||
|           <u-icon name="arrow-right"></u-icon> | ||||
|         </template> | ||||
|       </u-form-item> | ||||
|  | @ -212,7 +201,7 @@ const formAttrList = reactive<ComType>([ | |||
|   { | ||||
|     name: "客户", | ||||
|     key: "userName", | ||||
|     type: "selectCustom", | ||||
|     type: "select", | ||||
|     required: true, | ||||
|     childKey: "userSelect", | ||||
|     unit: "", | ||||
|  | @ -225,7 +214,7 @@ const formAttrList = reactive<ComType>([ | |||
|   { | ||||
|     name: "出货产品", | ||||
|     key: "productName", | ||||
|     type: "selectCustom", | ||||
|     type: "select", | ||||
|     required: true, | ||||
|     childKey: "productSelect", | ||||
|     unit: "", | ||||
|  |  | |||
|  | @ -548,7 +548,7 @@ const handleUpdateOrder = () => { | |||
| 
 | ||||
| // 重新过毛 | ||||
| const handleReWeight = () => { | ||||
|   ShipmentApi.reGrossWeight({ id: state.order.id }).then((res) => { | ||||
|   ShipmentApi.reGrossWeight({ id: state.order.id, userId: state.order.userId, deviceId: state.order.deviceId }).then((res) => { | ||||
|     if (res.code === 200) { | ||||
|       uni.navigateTo({ | ||||
|         url: "/pagesShipment/shipmenting?scaleStatus=1", // 要跳转到的页面路径 | ||||
|  |  | |||
|  | @ -126,7 +126,7 @@ export const getShipmentCategory = () => { | |||
| // 出货分类根据id查询
 | ||||
| export const getShipmentCategoryById = (data: any) => { | ||||
|   return http({ | ||||
|     method: 'POST', | ||||
|     method: 'GET', | ||||
|     url: '/api/shmcategory/selectShCyById', | ||||
|     data, | ||||
|   }) | ||||
|  | @ -211,4 +211,12 @@ export const getChildrenList = () => { | |||
|   }) | ||||
| } | ||||
| 
 | ||||
| // 出货父类分类查询
 | ||||
| export const allShmCategory = () => { | ||||
|   return http({ | ||||
|     method: 'GET', | ||||
|     url: '/api/shmcategory/allShmCategory', | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -27,6 +27,9 @@ body { | |||
| .l-h-28 { | ||||
|   line-height: 28px; | ||||
| } | ||||
| .ml-20 { | ||||
|   margin-left: 20rpx; | ||||
| } | ||||
| .mt-30 { | ||||
|   margin-top: 30rpx; | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 admin
						admin