Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {add,multiply,multiplyAuto,divideAuto} from '@/utils/decimal'; |
| | | |
| | | const company = companyInfo() |
| | | let produceList = ref([]) |
| | | let otherMoney = [] |
| | |
| | | produceList.value.forEach(item => { |
| | | sumMoney+=item.DeliveryDetail.money |
| | | }) |
| | | |
| | | console.log(otherMoney.value) |
| | | otherMoney1=[] |
| | | otherMoney=deepClone(res.data.otherMoney) |
| | | for(let i=0;i<otherMoney.length;i++){ |
| | |
| | | else{ |
| | | for(let s=0;s<otherMoney1.length;s++){ |
| | | if(otherMoney[i].DeliveryDetailOtherMoney.alias===otherMoney1[s].DeliveryDetailOtherMoney.alias){ |
| | | otherMoney1[s].DeliveryDetailOtherMoney.count=otherMoney[i].DeliveryDetailOtherMoney.count+otherMoney1[s].DeliveryDetailOtherMoney.count |
| | | otherMoney1[s].DeliveryDetailOtherMoney.monery =otherMoney[i].DeliveryDetailOtherMoney.monery+otherMoney1[s].DeliveryDetailOtherMoney.monery |
| | | |
| | | otherMoney1[s].DeliveryDetailOtherMoney.count=add(otherMoney[i].DeliveryDetailOtherMoney.count,otherMoney1[s].DeliveryDetailOtherMoney.count) |
| | | otherMoney1[s].DeliveryDetailOtherMoney.monery =add(otherMoney[i].DeliveryDetailOtherMoney.monery,otherMoney1[s].DeliveryDetailOtherMoney.monery) |
| | | break |
| | | } |
| | | if(s+1===otherMoney1.length){ |
| | |
| | | <span style="width: 25%">{{item.DeliveryDetailOtherMoney.alias}}</span> |
| | | <span style="width: 25%">{{item.DeliveryDetailOtherMoney.price}}</span> |
| | | <span style="width: 25%">{{item.DeliveryDetailOtherMoney.count}}</span> |
| | | <span style="width: 25%">{{parseFloat(item.DeliveryDetailOtherMoney.monery.toFixed(2))}}</span> |
| | | <span style="width: 25%">{{parseFloat(item.DeliveryDetailOtherMoney.monery).toFixed(2)}}</span> |
| | | </div> |
| | | <div style="display: flex;font-size: 10px;text-align: center" v-if="delivery.freight>0"> |
| | | <span style="width: 25%">运费</span> |
| | |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {add,multiply,multiplyAuto,divideAuto} from '@/utils/decimal'; |
| | | const company = companyInfo() |
| | | let produceList = ref([]) |
| | | let delivery = ref([]) |
| | |
| | | else{ |
| | | for(let s=0;s<otherMoney1.length;s++){ |
| | | if(otherMoney[i].DeliveryDetailOtherMoney.alias===otherMoney1[s].DeliveryDetailOtherMoney.alias){ |
| | | otherMoney1[s].DeliveryDetailOtherMoney.count=otherMoney[i].DeliveryDetailOtherMoney.count+otherMoney1[s].DeliveryDetailOtherMoney.count |
| | | otherMoney1[s].DeliveryDetailOtherMoney.monery =otherMoney[i].DeliveryDetailOtherMoney.monery+otherMoney1[s].DeliveryDetailOtherMoney.monery |
| | | otherMoney1[s].DeliveryDetailOtherMoney.count=add(otherMoney[i].DeliveryDetailOtherMoney.count,otherMoney1[s].DeliveryDetailOtherMoney.count) |
| | | otherMoney1[s].DeliveryDetailOtherMoney.monery =add(otherMoney[i].DeliveryDetailOtherMoney.monery,otherMoney1[s].DeliveryDetailOtherMoney.monery) |
| | | break |
| | | } |
| | | if(s+1===otherMoney1.length){ |
| | |
| | | else{ |
| | | for(let s=0;s<otherMoney1.length;s++){ |
| | | if(otherMoney[i].DeliveryDetailOtherMoney.alias===otherMoney1[s].DeliveryDetailOtherMoney.alias){ |
| | | otherMoney1[s].DeliveryDetailOtherMoney.count=otherMoney[i].DeliveryDetailOtherMoney.count+otherMoney1[s].DeliveryDetailOtherMoney.count |
| | | otherMoney1[s].DeliveryDetailOtherMoney.monery =otherMoney[i].DeliveryDetailOtherMoney.monery+otherMoney1[s].DeliveryDetailOtherMoney.monery |
| | | otherMoney1[s].DeliveryDetailOtherMoney.count=add(otherMoney[i].DeliveryDetailOtherMoney.count,otherMoney1[s].DeliveryDetailOtherMoney.count) |
| | | otherMoney1[s].DeliveryDetailOtherMoney.monery =add(otherMoney[i].DeliveryDetailOtherMoney.monery,otherMoney1[s].DeliveryDetailOtherMoney.monery) |
| | | break |
| | | } |
| | | if(s+1===otherMoney1.length){ |
| | |
| | | <span style="width: 25%">{{item.DeliveryDetailOtherMoney.alias}}</span> |
| | | <span style="width: 25%">{{item.DeliveryDetailOtherMoney.price}}</span> |
| | | <span style="width: 25%">{{item.DeliveryDetailOtherMoney.count}}</span> |
| | | <span style="width: 25%">{{parseFloat(item.DeliveryDetailOtherMoney.monery.toFixed(2))}}</span> |
| | | <span style="width: 25%">{{parseFloat(item.DeliveryDetailOtherMoney.monery).toFixed(2)}}</span> |
| | | </div> |
| | | </td> |
| | | <td style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="5">大写金额: {{money}}</td> |
| | |
| | | user :'User', |
| | | role :'Role', |
| | | userPassWord :'User Pass Word', |
| | | glassPrice:'Glass Price' |
| | | }, |
| | | glassPrice:{ |
| | | glassPriceComputed:'玻璃报价', |
| | | priceSet:'价格设置', |
| | | priceList:'价格列表', |
| | | msg:{ |
| | | error1:'请选择全部参数', |
| | | error2:'此膜系已经存在,请重新选择', |
| | | success:'数据保存成功', |
| | | addProduce:'请先添加产品' |
| | | }, |
| | | glass:'玻璃', |
| | | interlayer:'夹胶', |
| | | hollow:'中空', |
| | | craft:'工艺', |
| | | addProduce:'选择产品', |
| | | reorder:'转订单' |
| | | } |
| | | |
| | | |
| | |
| | | user :'Список пользователей', |
| | | role :'Права на роль', |
| | | userPassWord :'Изменить пароль', |
| | | glassPrice:'Цена стекла.' |
| | | }, |
| | | |
| | | glassPrice:{ |
| | | glassPriceComputed:'玻璃报价', |
| | | priceSet:'价格设置', |
| | | priceList:'价格列表', |
| | | msg:{ |
| | | error1:'请选择全部参数', |
| | | error2:'此膜系已经存在,请重新选择', |
| | | success:'数据保存成功', |
| | | addProduce:'请先添加产品' |
| | | }, |
| | | glass:'玻璃', |
| | | interlayer:'夹胶', |
| | | hollow:'中空', |
| | | craft:'工艺', |
| | | addProduce:'选择产品', |
| | | reorder:'转订单' |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | user :'用户列表', |
| | | role :'角色权限', |
| | | userPassWord :'修改密码', |
| | | glassPrice:'玻璃价格' |
| | | }, |
| | | |
| | | glassPrice:{ |
| | | glassPriceComputed:'玻璃报价', |
| | | priceSet:'价格设置', |
| | | priceList:'价格列表', |
| | | msg:{ |
| | | error1:'请选择全部参数', |
| | | error2:'此膜系已经存在,请重新选择', |
| | | success:'数据保存成功', |
| | | addProduce:'请先添加产品' |
| | | }, |
| | | glass:'玻璃', |
| | | interlayer:'夹胶', |
| | | hollow:'中空', |
| | | craft:'工艺', |
| | | addProduce:'选择产品', |
| | | reorder:'转订单' |
| | | } |
| | | |
| | | |
| | |
| | | <div id="main"> |
| | | <div id="div-title"> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/glassPrice/producePriceCompute' }">{{'玻璃报价'}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/glassPrice/glassPriceSet' }">{{'价格设置'}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/glassPrice/glassPriceList' }">{{'价格列表'}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/glassPrice/producePriceCompute' }">{{$t('glassPrice.glassPriceComputed')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/glassPrice/glassPriceSet' }">{{$t('glassPrice.priceSet')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/glassPrice/glassPriceList' }">{{$t('glassPrice.priceList')}}</el-breadcrumb-item> |
| | | <!-- <el-breadcrumb-item :to="{ path: '/main/product/test' }">测试</el-breadcrumb-item>--> |
| | | <!-- <el-breadcrumb-item :to="{ path: '/main/product/testSort11' }">测试</el-breadcrumb-item>--> |
| | | <el-breadcrumb-item v-show="false" /> |
| | |
| | | columns:[ |
| | | {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",}, |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 }, |
| | | {field: 'type', title: '类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'name', title: '名称',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'price', title: '价格' ,editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'createTime', title: '创建时间',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged} |
| | | {field: 'type', title: t('product.msg.interlayerType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'name', title: t('orderBasicData.name'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'price', title: t('menu.glassPrice') ,editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'createTime', title: t('basicData.creationTime'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged} |
| | | |
| | | ], |
| | | |
| | |
| | | ElMessageBox.prompt( '', { |
| | | confirmButtonText: t('basicData.save'), |
| | | cancelButtonText: t('basicData.cancelButtonText'), |
| | | inputPattern:/^.{1,20}$/, |
| | | inputErrorMessage: t('components.message') |
| | | inputPattern:/^(0(\.\d{1,2})?|([1-9]\d{0,4})(\.\d{1,2})?|99999(\.9{1,2})?)$/, |
| | | inputErrorMessage: t('basicData.msg.range99999Dec2') |
| | | }).then(({ value }) => { |
| | | alert(value) |
| | | const data = { |
| | | id: row.id, |
| | | price: value |
| | | } |
| | | request.post(`/glassPriceBasic/updateGlassPriceById`,data).then((res) => { |
| | | if(res.code==='200' && res.data){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path:'/main/glassPrice/glassPriceList',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | } |
| | | }) |
| | | }) |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/glassPriceBasic/deleteGlassPriceById/${row.id}`).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==='200' && res.data){ |
| | | ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | router.push({path:'/main/glassPrice/glassPriceList',query:{random:Math.random()}}) |
| | | }else{ |
| | |
| | | import glass from './pages/Glass.vue' |
| | | import Interlayer from './pages/Interlayer.vue' |
| | | import Hollow from './pages/Hollow.vue' |
| | | import Process from './pages/Process.vue' |
| | | import {onMounted, ref} from "vue"; |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {useRouter,useRoute} from "vue-router" |
| | | import {useI18n} from "vue-i18n"; |
| | | const { t } = useI18n() |
| | | let BasicData = ref({ |
| | | stuffColor:null, |
| | | stuffCraft:null, |
| | |
| | | const getChild = (value) =>{ |
| | | for (let key in value) { |
| | | if(!value[key]){ |
| | | ElMessage.warning("请选择全部参数") |
| | | ElMessage.warning(t('glassPrice.msg.error1')) |
| | | return |
| | | } |
| | | } |
| | | |
| | | request.post(`/glassPriceBasic/save`,value).then((res) => { |
| | | if(res.code==='200' && res.data===true){ |
| | | ElMessage.success("数据保存成功") |
| | | ElMessage.success(t('glassPrice.msg.success')) |
| | | router.push({path:'/main/glassPrice/glassPriceList'}) |
| | | }else{ |
| | | ElMessage.warning("此膜系已经存在,请重新选择") |
| | | ElMessage.warning(t('glassPrice.msg.error1')) |
| | | } |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <div id="main-div"> |
| | | <el-tabs v-model="tabsValue" type="border-card" style="width: 100%;height: 100%"> |
| | | <el-tab-pane :name="1" label="玻璃" > |
| | | <el-tab-pane :name="1" :label="t('glassPrice.glass')" > |
| | | <glass @getChild="getChild" v-if="tabsValue===1" :basicData="BasicData"/> |
| | | </el-tab-pane> |
| | | <el-tab-pane :name="2" label="夹胶"> |
| | | <el-tab-pane :name="2" :label="t('glassPrice.interlayer')"> |
| | | <interlayer @getChild="getChild" v-if="tabsValue===2" :basicData="BasicData"/> |
| | | </el-tab-pane> |
| | | <el-tab-pane :name="3" label="中空"> |
| | | <el-tab-pane :name="3" :label="t('glassPrice.hollow')"> |
| | | <hollow @getChild="getChild" v-if="tabsValue===3" :basicData="BasicData"/> |
| | | </el-tab-pane> |
| | | <el-tab-pane :name="4" :label="t('glassPrice.craft')"> |
| | | <process @getChild="getChild" v-if="tabsValue===4" :basicData="BasicData"/> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'addProducts', 'name': '选择产品',disabled: false}, |
| | | {'code': 'reorder', 'name': '转订单',status: 'primary',icon: 'vxe-icon-save',disabled: false}, |
| | | {'code': 'addProducts', 'name': t('glassPrice.addProduce'),disabled: false}, |
| | | {'code': 'reorder', 'name': t('glassPrice.reorder'),status: 'primary',icon: 'vxe-icon-save',disabled: false}, |
| | | |
| | | ], |
| | | zoom: true, |
| | |
| | | } |
| | | case 'reorder': { |
| | | if($grid.getTableData().fullData.length === 0){ |
| | | ElMessage.warning("请先添加产品") |
| | | ElMessage.warning(t('glassPrice.msg.addProduce')) |
| | | return |
| | | } |
| | | router.push({ |
| | |
| | | quantity: '' |
| | | }, |
| | | items: [ |
| | | { field: 'width', title: '宽:', itemRender: { name: 'VxeInput' } }, |
| | | { field: 'height', title: '高:', itemRender: { name: 'VxeInput' } }, |
| | | { field: 'quantity', title: '数量:', itemRender: { name: 'VxeInput' } }, |
| | | { field: 'width', title: t('order.width')+':', itemRender: { name: 'VxeInput' } }, |
| | | { field: 'height', title: t('order.height')+':', itemRender: { name: 'VxeInput' } }, |
| | | { field: 'quantity', title: t('order.quantity')+':', itemRender: { name: 'VxeInput' } }, |
| | | { |
| | | itemRender: { |
| | | name: 'VxeButtonGroup', |
| | | options: [ |
| | | { type: 'submit', content: '确定', status: 'primary' }, |
| | | { type: 'reset', content: '重置' } |
| | | { type: 'submit', content: t('craft.sure'), status: 'primary' }, |
| | | { type: 'reset', content: t('product.msg.reset') } |
| | | ] |
| | | } |
| | | } |
| | |
| | | |
| | | <el-row :gutter="8"> |
| | | <el-col :span="3"> |
| | | <el-input |
| | | v-model.number="stuff.price" |
| | | <el-input-number |
| | | v-model="stuff.price" |
| | | controls-position="right" |
| | | :step="0.01" |
| | | :max="99999.99" |
| | | placeholder="元/m²" |
| | | class="delInput"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="3"> |
| | | <el-button @click="save" type="primary" >保存</el-button> |
| | | <el-button @click="save" type="primary" >{{$t('basicData.save')}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | .el-row{ |
| | | margin-bottom: 5px; |
| | | } |
| | | .el-input{ |
| | | .el-input-number{ |
| | | width: 182px; |
| | | } |
| | | /deep/.delInput input::-webkit-outer-spin-button, |
| | | /deep/.delInput input::-webkit-inner-spin-button { |
| | | -webkit-appearance: none!important; |
| | | } |
| | | /deep/.delInput input[type="number"]{ |
| | | -moz-appearance: textfield; |
| | | } |
| | | |
| | | |
| | |
| | | <el-option v-for="item in props.basicData.hollowType" |
| | | :key="item.id" |
| | | :label="item.basicName+'('+item.nickname+')'" |
| | | :value="item.nickname" |
| | | :value="'('+item.nickname+')'" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | |
| | | |
| | | <el-row :gutter="8"> |
| | | <el-col :span="3"> |
| | | <el-input |
| | | v-model.number="hollowBasic.price" |
| | | <el-input-number |
| | | v-model="hollowBasic.price" |
| | | controls-position="right" |
| | | :step="0.01" |
| | | :max="99999.99" |
| | | placeholder="元/m²" |
| | | class="delInput"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="3"> |
| | | <el-button @click="save" type="primary" >保存</el-button> |
| | | <el-button @click="save" type="primary" >{{$t('basicData.save')}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | .el-row{ |
| | | margin-bottom: 5px; |
| | | } |
| | | .el-input{ |
| | | .el-input-number{ |
| | | width: 182px; |
| | | } |
| | | /deep/.delInput input::-webkit-outer-spin-button, |
| | | /deep/.delInput input::-webkit-inner-spin-button { |
| | | -webkit-appearance: none!important; |
| | | } |
| | | /deep/.delInput input[type="number"]{ |
| | | -moz-appearance: textfield; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | <el-row :gutter="8"> |
| | | <el-col :span="3"> |
| | | <el-input |
| | | v-model.number="interlayerBasic.price" |
| | | <el-input-number |
| | | v-model="interlayerBasic.price" |
| | | controls-position="right" |
| | | :step="0.01" |
| | | :max="99999.99" |
| | | placeholder="元/m²" |
| | | class="delInput"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="3"> |
| | | <el-button @click="save" type="primary" >保存</el-button> |
| | | <el-button @click="save" type="primary" >{{$t('basicData.save')}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | .el-row{ |
| | | margin-bottom: 5px; |
| | | } |
| | | .el-input{ |
| | | .el-input-number{ |
| | | width: 182px; |
| | | } |
| | | /deep/.delInput input::-webkit-outer-spin-button, |
| | | /deep/.delInput input::-webkit-inner-spin-button { |
| | | -webkit-appearance: none!important; |
| | | } |
| | | /deep/.delInput input[type="number"]{ |
| | | -moz-appearance: textfield; |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | <script setup> |
| | | import {ref} from "vue" |
| | | import {useI18n} from "vue-i18n" |
| | | const { t } = useI18n() |
| | | |
| | | const props = defineProps({ |
| | | basicData:{ |
| | | stuffColor:null, |
| | | stuffThickness:null, |
| | | process:[] |
| | | } |
| | | }) |
| | | console.log(props.basicData) |
| | | let stuff = ref({ |
| | | thickness:'', |
| | | color:'', |
| | | process:'', |
| | | price:null, |
| | | type:'process' |
| | | }) |
| | | const emit = defineEmits(['getChild']) |
| | | |
| | | const save = ()=>{ |
| | | emit('getChild',stuff.value) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="12"> |
| | | <el-select v-model.trim="stuff.thickness" size="small" clearable :placeholder="$t('product.msg.thickness')" > |
| | | <el-option v-for="item in props.basicData.stuffThickness" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="8"> |
| | | <el-col :span="12"> |
| | | <el-select v-model.trim="stuff.color" size="small" clearable :placeholder="$t('product.msg.color')" filterable> |
| | | <el-option v-for="item in props.basicData.stuffColor" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="8"> |
| | | <el-col :span="12"> |
| | | <el-select v-model.trim="stuff.process" size="small" clearable :placeholder="$t('glassPrice.glass')+$t('glassPrice.craft')" filterable> |
| | | <el-option v-for="item in props.basicData.process" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="8"> |
| | | <el-col :span="3"> |
| | | <el-input-number |
| | | v-model="stuff.price" |
| | | controls-position="right" |
| | | :step="0.01" |
| | | :max="99999.99" |
| | | placeholder="元/m²" |
| | | class="delInput"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="3"> |
| | | <el-button @click="save" type="primary" >{{$t('basicData.save')}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .el-row{ |
| | | margin-bottom: 5px; |
| | | } |
| | | .el-input-number{ |
| | | width: 182px; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | private String type; |
| | | private Double thickness; |
| | | private String name; |
| | | private String process; |
| | | private Double price; |
| | | private String json; |
| | | private LocalDateTime createTime; |
| | |
| | | @Param("productId") Integer productId,@Param("orderId") String orderId); |
| | | |
| | | Map<String, Object> getSelectotherMoney(@Param("orderId") String orderId,@Param("deliveryId") String deliveryId, |
| | | @Param("orderNumber") Integer orderNumber,@Param("key") String key,@Param("value") String value); |
| | | @Param("orderNumber") Integer orderNumber,@Param("key") String key,@Param("value") Double value); |
| | | |
| | | Map<String, Object> getSelectOrderotherMoney(@Param("orderId") String orderId,@Param("orderNumber") Integer orderNumber, @Param("key") String key,@Param("value") String value); |
| | | Map<String, Object> getSelectOrderotherMoney(@Param("orderId") String orderId,@Param("orderNumber") Integer orderNumber, @Param("key") String key,@Param("value") Double value); |
| | | |
| | | List <Map<String, Object>> getSelectOrderDetailPrinting(@Param("productId") Integer productId,@Param("orderId") String orderId); |
| | | |
| | |
| | | deliveryDetailArea=getComputeArea.multiply(getQuantity).doubleValue(); |
| | | |
| | | }else if (calculateType==2){ |
| | | if(Objects.equals(orderDetail.getArea(), orderDetail.getComputeArea())){ |
| | | //判断实际单片面积跟结算单片面积是否相等 结算总面积跟实际总面积是否相等 |
| | | if(Objects.equals(orderDetail.getArea(), orderDetail.getComputeArea())&&Objects.equals(orderDetail.getGrossArea(), orderDetail.getComputeGrossArea())){ |
| | | deliveryDetailMoney=getWidth.multiply(getHeight).multiply(getQuantity).divide(BigDecimal.valueOf(1000000), 2, RoundingMode.HALF_UP) |
| | | .multiply(getPrice).setScale(2, RoundingMode.HALF_UP).doubleValue(); |
| | | deliveryDetailArea=getWidth.multiply(getHeight).multiply(getQuantity).divide(BigDecimal.valueOf(1000000), 2, RoundingMode.HALF_UP).doubleValue(); |
| | |
| | | boolean isnull = key.contains("M"); |
| | | if(isnull) { |
| | | Map<String, Object> moneryItemmap = new HashMap<>(); |
| | | Map<String, Object> deliveryDetailOtherMoney = deliveryDetailMapper.getSelectOrderotherMoney(orderDetail.getOrderId(),orderDetail.getOrderNumber(), key, jsonObject.get(key).toString()); |
| | | Map<String, Object> deliveryDetailOtherMoney = deliveryDetailMapper.getSelectOrderotherMoney(orderDetail.getOrderId(),orderDetail.getOrderNumber(), |
| | | key, Double.valueOf(jsonObject.get(key).toString())); |
| | | if(deliveryDetailOtherMoney.get("monery")!=null){ |
| | | otherMoneys=otherMoneys+Double.valueOf(deliveryDetailOtherMoney.get("monery").toString()); |
| | | deliveryDetailotherMoneys=Double.valueOf(deliveryDetailOtherMoney.get("monery").toString()); |
| | |
| | | |
| | | int intMoney= (int) Math.round(money+freight+otherMoneys); |
| | | //修改发货明细累加面积数量金额 |
| | | deliveryMapper.updatedelivery(Double.valueOf(String.format("%.2f", area)), quantity, Double.valueOf(intMoney), otherMoney.get(), oddNumber); |
| | | deliveryMapper.updatedelivery(Double.valueOf(String.format("%.2f", area)), quantity, Double.valueOf(intMoney), otherMoneys, oddNumber); |
| | | logService.saveLog(log); |
| | | } else { |
| | | return "false3"; |
| | |
| | | if(isnull) { |
| | | Map<String, Object> moneryItemmap = new HashMap<>(); |
| | | Map<String, Object> deliveryDetailOtherMoney = deliveryDetailMapper.getSelectotherMoney(detail.getOrderDetail().getOrderId(), |
| | | detail.getDeliveryId(),Integer.parseInt(stringObjectMap.get("order_number").toString()), key, jsonObject.get(key).toString()); |
| | | |
| | | detail.getDeliveryId(),Integer.parseInt(stringObjectMap.get("order_number").toString()), key,Double.valueOf(jsonObject.get(key).toString())); |
| | | Double sss= Double.valueOf(jsonObject.get(key).toString()); |
| | | moneryItemmap.put("DeliveryDetailOtherMoney", deliveryDetailOtherMoney); |
| | | moneryList.add(moneryItemmap); |
| | | } |
| | |
| | | boolean isnull = key.contains("M"); |
| | | if(isnull){ |
| | | Map<String, Object> moneryItemmap = new HashMap<>(); |
| | | Map<String, Object> deliveryDetailOtherMoney = deliveryDetailMapper.getSelectOrderotherMoney(detail.getOrderId(),Integer.parseInt(stringObjectMap.get("order_number").toString()),key,jsonObject.get(key).toString()); |
| | | Map<String, Object> deliveryDetailOtherMoney = deliveryDetailMapper.getSelectOrderotherMoney(detail.getOrderId(),Integer.parseInt(stringObjectMap.get("order_number").toString()) |
| | | ,key,Double.valueOf(jsonObject.get(key).toString())); |
| | | grossAmount=grossAmount.add(BigDecimal.valueOf(Double.parseDouble(deliveryDetailOtherMoney.get("monery").toString()))); |
| | | moneryItemmap.put("DeliveryDetailOtherMoney", deliveryDetailOtherMoney); |
| | | moneryList.add(moneryItemmap); |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | |
| | | @DS("sd") |
| | | public class GlassPriceBasicService { |
| | | private final GlassPriceBasicMapper glassPriceBasicMapper; |
| | | @Autowired |
| | | private ProductDetailMapper productDetailMapper; |
| | | private final ProductDetailMapper productDetailMapper; |
| | | |
| | | public GlassPriceBasicService(GlassPriceBasicMapper glassPriceBasicMapper) { |
| | | public GlassPriceBasicService(GlassPriceBasicMapper glassPriceBasicMapper, ProductDetailMapper productDetailMapper) { |
| | | this.glassPriceBasicMapper = glassPriceBasicMapper; |
| | | this.productDetailMapper = productDetailMapper; |
| | | } |
| | | |
| | | //保存玻璃价格 |
| | |
| | | prams.get("thickness").toString() |
| | | + prams.get("color").toString() |
| | | + prams.get("types").toString()); |
| | | } else if (Objects.equals(type, "process")) { |
| | | glassPriceBasic.setName(prams.get("thickness").toString() + prams.get("color").toString()+prams.get("process").toString()); |
| | | glassPriceBasic.setProcess(prams.get("process").toString()); |
| | | } |
| | | GlassPriceBasic glassPriceBasic1 = glassPriceBasicMapper.selectOne(new QueryWrapper<GlassPriceBasic>().eq("name", glassPriceBasic.getName())); |
| | | GlassPriceBasic glassPriceBasic1 = glassPriceBasicMapper.selectOne( |
| | | new QueryWrapper<GlassPriceBasic>() |
| | | .eq("name", glassPriceBasic.getName()) |
| | | ); |
| | | if(glassPriceBasic1 != null){ |
| | | return false; |
| | | } |
| | |
| | | .selectList(new QueryWrapper<ProductDetail>().eq("prod_id", productId)); |
| | | |
| | | final Double[] money = {0.0}; |
| | | productDetails.forEach(productDetail -> { |
| | | for (ProductDetail productDetail : productDetails){ |
| | | Map<String,String> separation = JSON.parseObject( |
| | | productDetail.getSeparation(), new TypeReference<Map<String, String>>(){}); |
| | | String name = ""; |
| | | switch (productDetail.getDetailType()) { |
| | | case "glass": |
| | | name = separation.get("thickness") + separation.get("color"); |
| | | String[] process = productDetail.getProcess().split("->"); |
| | | for (String s : process) { |
| | | GlassPriceBasic glassPriceBasic = glassPriceBasicMapper.selectOne( |
| | | new QueryWrapper<GlassPriceBasic>() |
| | | .eq("name", name+s)); |
| | | if(glassPriceBasic == null) { |
| | | return 0.0; |
| | | }else{ |
| | | money[0] += glassPriceBasic.getPrice(); |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case "hollow": |
| | | name = separation.get("thickness") + separation.get("gasType") + separation.get("type"); |
| | | name = separation.get("thickness") + separation.get("gasType") + separation.get("Type"); |
| | | break; |
| | | case "interlayer": |
| | | name = separation.get("thickness") + separation.get("color") + separation.get("type"); |
| | | break; |
| | | } |
| | | |
| | | GlassPriceBasic glassPriceBasic = glassPriceBasicMapper |
| | | .selectOne(new QueryWrapper<GlassPriceBasic>().eq("name", name)); |
| | | if(glassPriceBasic == null) { |
| | | money[0]= 0.0; |
| | | return; |
| | | return money[0]; |
| | | } |
| | | money[0] += glassPriceBasic.getPrice(); |
| | | }); |
| | | } |
| | | return money[0]; |
| | | } |
| | | |
| | |
| | | orderOtherMoney.setId(null); |
| | | orderOtherMoney.setOrderId(orderId); |
| | | if(orderOtherMoney.getQuantity()!=null && orderOtherMoney.getPrice()!=null){ |
| | | orderOtherMoney.setMoney((orderOtherMoney.getQuantity()*orderOtherMoney.getPrice())); |
| | | BigDecimal getQuantity= BigDecimal.valueOf(orderOtherMoney.getQuantity()); |
| | | BigDecimal getPrice= BigDecimal.valueOf(orderOtherMoney.getPrice()); |
| | | orderOtherMoney.setMoney(getQuantity.multiply(getPrice).setScale(2, RoundingMode.HALF_UP).doubleValue()); |
| | | }else { |
| | | orderOtherMoney.setMoney(0.0); |
| | | } |