|
|
@@ -28,7 +28,7 @@
|
|
|
<InputPop ref="cusName" v-model="formData.cusName" :readonly="true"/>
|
|
|
</DkFormItem>
|
|
|
<!--业务部门-->
|
|
|
- <DkFormItem prop="orgId" :label="$t('orgId')" :required="true">
|
|
|
+ <DkFormItem prop="orgId" :label="$t('deptOrg')" :required="true">
|
|
|
<SelectMagnifier v-model="formData.orgId" :display-text="formData.orgName"
|
|
|
:type="this.$config.MagnifierType.org"
|
|
|
@ok="orgOk"
|
|
|
@@ -36,7 +36,7 @@
|
|
|
:multiple="false"/>
|
|
|
</DkFormItem>
|
|
|
<!--业务员-->
|
|
|
- <DkFormItem prop="staffId" :label="$t('staffId')" :required="true">
|
|
|
+ <DkFormItem prop="staffId" :label="$t('deptStaff')" :required="true">
|
|
|
<SelectMagnifier v-model="formData.staffId" :display-text="formData.staffName"
|
|
|
:type="this.$config.MagnifierType.staff"
|
|
|
@ok="staffOk"
|
|
|
@@ -46,7 +46,7 @@
|
|
|
<!--自动解冻时间-->
|
|
|
<DkFormItem prop="autoUnfreezeDate" :data-type="$config.dataType.autoUnfreezeDate">
|
|
|
<DatePickerPop v-model="formData.autoUnfreezeDate" :readonly="checkColumnIsEdit('autoUnfreezeDate')"
|
|
|
- :short-cut-flag="true"/>
|
|
|
+ :short-cut-flag="true" :min-flag="true"/>
|
|
|
</DkFormItem>
|
|
|
<!--商品总数量-->
|
|
|
<DkFormItem prop="sumQuantity">
|
|
|
@@ -64,9 +64,11 @@
|
|
|
<EditTable ref="goodsTable" :data="formData.itemList" showFooter
|
|
|
major-field="itemId"
|
|
|
control-id="invId"
|
|
|
- :new-row-flag="true" :height="tableHeight"
|
|
|
+ :new-row-flag="true" :height="400"
|
|
|
:columns="this.type === this.$config.formMode.add ? freezeItemColumns: unfreezeItemColumns"
|
|
|
@changeValue="getTotals"
|
|
|
+ @on-choose="getTotals"
|
|
|
+ @changeNonStandard="changeNonStandard"
|
|
|
></EditTable>
|
|
|
</div>
|
|
|
</DkPanel>
|
|
|
@@ -94,15 +96,15 @@ export default {
|
|
|
let self = this
|
|
|
return {
|
|
|
formData: {
|
|
|
- orgId: null,
|
|
|
+ orgId: self.$store.state.user.orgId,
|
|
|
makeStaff: self.$store.state.user.id,
|
|
|
- staffId: null,
|
|
|
- staffName: null,
|
|
|
+ staffId: self.$store.state.user.staffId,
|
|
|
+ staffName: self.$store.state.user.staffName,
|
|
|
staffCode: null,
|
|
|
cusId:null,
|
|
|
cusPhone:null,
|
|
|
cusName:null,
|
|
|
- orgName: null,
|
|
|
+ orgName: self.$store.state.user.orgName,
|
|
|
orgCode: null,
|
|
|
remarks: null,
|
|
|
sumQuantity:null,
|
|
|
@@ -119,7 +121,13 @@ export default {
|
|
|
controlId: 'invId',
|
|
|
dataType: self.$config.tableSelectType.inventory,
|
|
|
fieldUpdate: self.$updateColumns.freezeChooseIvt,
|
|
|
- searchDetailFlag: true
|
|
|
+ searchDetailFlag: true,
|
|
|
+ // 查询条件
|
|
|
+ otherSearchParam: () => {
|
|
|
+ return {
|
|
|
+ inqtyFlag: true,
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
field: 'skuName',
|
|
|
@@ -127,7 +135,13 @@ export default {
|
|
|
controlId: 'invId',
|
|
|
dataType: self.$config.tableSelectType.inventory,
|
|
|
fieldUpdate: self.$updateColumns.freezeChooseIvt,
|
|
|
- searchDetailFlag: true
|
|
|
+ searchDetailFlag: true,
|
|
|
+ // 查询条件
|
|
|
+ otherSearchParam: () => {
|
|
|
+ return {
|
|
|
+ inqtyFlag: true,
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
field: 'skuCode',
|
|
|
@@ -158,31 +172,16 @@ export default {
|
|
|
piece: ['freezeQty%packBox', 'freezeQty', 'packBox'],
|
|
|
},
|
|
|
},
|
|
|
- //包装
|
|
|
+ //基本单位
|
|
|
{
|
|
|
- field: 'packBox',
|
|
|
+ field: 'unitName',
|
|
|
+ title: self.$t('piece'),
|
|
|
type: 'disabled',
|
|
|
},
|
|
|
- //箱
|
|
|
{
|
|
|
- field: 'box',
|
|
|
- type: 'number',
|
|
|
- digits: 0,
|
|
|
- sum: true,
|
|
|
- formula: {
|
|
|
- freezeQty: ['box*packBox+piece', 'box', 'packBox','piece'],
|
|
|
- },
|
|
|
- },
|
|
|
- //片
|
|
|
- {
|
|
|
- field: 'piece',
|
|
|
- type: 'number',
|
|
|
- digits: 0,
|
|
|
- sum: true,
|
|
|
- formula: {
|
|
|
- freezeQty: ['box*packBox+piece', 'piece','box','packBox'],
|
|
|
- box: ['(box*packBox+piece)%packBox', 'piece', 'box' , 'packBox','packBox'],
|
|
|
- },
|
|
|
+ field: 'unitInfo',
|
|
|
+ title: self.$t('boxPiece'),
|
|
|
+ type: 'nonStandard',
|
|
|
},
|
|
|
//备注
|
|
|
{
|
|
|
@@ -268,6 +267,21 @@ export default {
|
|
|
|
|
|
methods: {
|
|
|
/**
|
|
|
+ * @desc : 修改包装数
|
|
|
+ * @author : 周兴
|
|
|
+ * @date : 2024/5/24 15:02
|
|
|
+ */
|
|
|
+ changeNonStandard({row,rowIndex,field}){
|
|
|
+ let table = this.$refs['goodsTable'].tableData
|
|
|
+ table[rowIndex][field] = (row['nonStandardForm']['box']?row['nonStandardForm']['box']:0)
|
|
|
+ + row['subUnitName']
|
|
|
+ +(row['nonStandardForm']['piece'] == 0 || row['nonStandardForm']['piece'] ?row['nonStandardForm']['piece']:'')
|
|
|
+ +(row['unitName']?(row['nonStandardForm']['piece']?row['unitName']:''):'')
|
|
|
+ table[rowIndex]['box'] = row['nonStandardForm']['box']?row['nonStandardForm']['box']:0
|
|
|
+ table[rowIndex]['piece'] = row['nonStandardForm']['piece'] ?row['nonStandardForm']['piece']:0
|
|
|
+ table[rowIndex]['freezeQty'] = row['packBox'] * (row['nonStandardForm']['box']?row['nonStandardForm']['box']:0) + (row['nonStandardForm']['piece'] ?row['nonStandardForm']['piece']:0)
|
|
|
+ },
|
|
|
+ /**
|
|
|
* @desc : 获取客户相关
|
|
|
* @author : 宋扬
|
|
|
* @date : 2024/3/14 15:05
|
|
|
@@ -316,13 +330,39 @@ export default {
|
|
|
* @date : 2024/3/14 16:36
|
|
|
*/
|
|
|
getTotals(field, row, rowIndex) {
|
|
|
- let table = this.$refs['goodsTable'].getTableDataFilter();
|
|
|
+ let table = this.$refs['goodsTable'].tableData;
|
|
|
let sumQuantity = 0; // 合计数量
|
|
|
if (table && table.length > 0) {
|
|
|
table.forEach(row => {
|
|
|
if (row["freezeQty"]) {
|
|
|
sumQuantity += parseFloat(row["freezeQty"]);
|
|
|
}
|
|
|
+ this.decimalPlaces = row['decimalPlaces']
|
|
|
+ if(row['subUnitId']){
|
|
|
+ row.nonStandardForm = {
|
|
|
+ formula: (row['subUnitName']?'1'+row['subUnitName']+ '=':'' ) + row['packBox'] + row['unitName'],
|
|
|
+ box:(row['freezeQty']/row['packBox'] >= 1 ? Math.floor(row['freezeQty']/row['packBox']):0),
|
|
|
+ piece:row['freezeQty']%row['packBox']?row['freezeQty']%row['packBox']:0,
|
|
|
+ }
|
|
|
+ row.nonStandardItems = [
|
|
|
+ {code:'formula',label:'计算公式',type:'text',readonly:true},
|
|
|
+ {code:'box',label:row['subUnitName'],type:'number' },
|
|
|
+ {code:'piece',label:row['unitName'],type:'number',digits:this.decimalPlaces}
|
|
|
+ ]
|
|
|
+ row['unitInfo'] = (row['freezeQty']/row['packBox'] >= 1 ? Math.floor(row['freezeQty']/row['packBox']):0) + row['subUnitName'] + (row['freezeQty']%row['packBox']?row['freezeQty']%row['packBox']:0).toFixed(this.decimalPlaces) + row['unitName']
|
|
|
+ }else{
|
|
|
+ row.nonStandardForm = {
|
|
|
+ formula: (row['subUnitName']?'1'+row['subUnitName']+ '=':'' ) + row['packBox'] + row['unitName'],
|
|
|
+ piece:row['freezeQty'],
|
|
|
+ }
|
|
|
+ row.nonStandardItems = [
|
|
|
+ {code:'formula',label:'计算公式',type:'text',readonly:true},
|
|
|
+ {code:'piece',label:row['unitName'],type:'number',digits: this.decimalPlaces}
|
|
|
+ ]
|
|
|
+ row['unitInfo'] = row['freezeQty'] + row['unitName']
|
|
|
+ }
|
|
|
+ row['box'] = row['nonStandardForm']['box']
|
|
|
+ row['piece'] = row['nonStandardForm']['piece']
|
|
|
})
|
|
|
this.formData.sumQuantity = sumQuantity;
|
|
|
}
|